Hi Senthil, Sorry for the unclear commit message. There are two approaches to add a new permission 1. By custom permissions As it showed ( https://staging.review.linaro.org/#/c/321/5/lava_scheduler_app/models.py), I removed it, because in order to apply new permission, we need to run command "/srv/lava/instances/<INSTANCE>/bin/lava-server manage syncdb --all". We have modify lava-deployment-tool to add "--all" parameter. But, after my test, it will cause database migration fail when install a brain new instance
2. By data migration https://staging.review.linaro.org/#/c/321/5/lava_scheduler_app/migrations/0034_add_permission_cancel_resubmit_testjob.py This method no need to modify lava-deployment-tool. The new permission will take effect by runing "lava-server manage migrate lava_scheduler_app" Sorry for the blocking, I'll do some test tomorrow. Arthur 2013/11/11 Senthil Kumaran <[email protected]> > Hi Arthur, > > I couldn't understand the commit message below. I could see that > migrations are broken due to this commit. Can you elaborate what should be > done here? > > I usually run schemamigrations once I change something on the model, but > it is not working anymore due to the following commit. > > <snip> > commit 9cd85a647703f080cecd0e5070ca81f8684ee7b4 > Author: Arthur She <[email protected]> > Date: Wed Oct 16 19:24:37 2013 -0700 > > Add new permission 'cancel_resubmit_testjob' to allow manipulating > test jobs > > - Bug #1172724 > - Due to command "lava-server manage syncdb --all" will cause db > migration > fail and it need to modify lava-deployment-tool. Change to data > migration method to add the new permission cancel_resubmit_testjob. > - Anyone who has this permission can cancel / resubmit test jobs. > > Change-Id: Ib5ee8cd4df2850f16747dc2e2cb182732cbec1cc > Reviewed-on: https://staging.review.linaro.org/321 > Reviewed-by: lava-bot <[email protected]> > Reviewed-by: Antonio Terceiro <[email protected]> > </snip> > > I would like to know what do you mean by the following: > > <snip> > Due to command "lava-server manage syncdb --all" will cause db migration > fail and it need to modify lava-deployment-tool. Change to data > migration method to add the new permission cancel_resubmit_testjob. > </snip> > > Thank You. > > PS: Blocked on this for a long time now, since I couldn't modify the model > for heartbeat check :( > > -- > Senthil Kumaran > http://www.stylesen.org/ > http://www.sasenthilkumaran.com/ >
_______________________________________________ linaro-validation mailing list [email protected] http://lists.linaro.org/mailman/listinfo/linaro-validation
