Hi All,
I am working on moving vdsm.init script to vdsm-tool. But the vdsm.init script uses some of functions from /etc/init.d/functions. So I plan to re-code the /etc/init.d/functions or part of it with python code and also move it to vdsm-tool. Is it okey?
BR. Wenyi
On Thu, May 10, 2012 at 11:36:08AM +0800, Wenyi Gao wrote:
Hi All,
I am working on moving vdsm.init script to vdsm-tool. But the vdsm.init script uses some of functions from /etc/init.d/functions. So I plan to re-code the /etc/init.d/functions or part of it with python code and also move it to vdsm-tool. Is it okey?
Which functions do you intend to re-implement? On the face of it, I prefer to put a bash script under vdsm-tool over reimplementation of initscripts in Python. Federico?
----- Original Message -----
From: "Wenyi Gao" wenyi@linux.vnet.ibm.com To: vdsm-devel@lists.fedorahosted.org Sent: Thursday, May 10, 2012 5:36:08 AM Subject: [vdsm] Re-code /etc/init.d/functions script with Python and move it to vdsm-tool
Hi All,
I am working on moving vdsm.init script to vdsm-tool. But the vdsm.init script uses some of functions from /etc/init.d/functions. So I plan to re-code the /etc/init.d/functions or part of it with python code and also move it to vdsm-tool. Is it okey?
Ah thanks for asking, this is something dear to me :) Basically the init file shouldn't be in python and should look as much as possible like the standard one:
http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=blob;f=template.init
All the rest should be moved to vdsm-tool as:
- check_port_taken - mk_data_center - mk_dom_backup - mk_upgrade_path - mk_core_path - mk_run_path - get_libvirt_conf_item - test_conflicting_conf - shutdown_conflicting_srv (on fedora this is taken care by systemd) - upstart_libvirt - start_needed_srv (on fedora this is taken care by systemd) - test_lo - free_space - test_space - bond_dev_available - load_needed_modules - test_already_running - configure_libvirt - configure_sysctl
Feel free to regroup the actions as you want (maybe it would make sense to have just one function with all the mk_* commands, etc...)
So to answer your question, no, you shouldn't need to re-code the init.d functions.
Thanks,
On 2012-05-10 15:33, Federico Simoncelli wrote:
----- Original Message -----
From: "Wenyi Gao"wenyi@linux.vnet.ibm.com To: vdsm-devel@lists.fedorahosted.org Sent: Thursday, May 10, 2012 5:36:08 AM Subject: [vdsm] Re-code /etc/init.d/functions script with Python and move it to vdsm-tool
Hi All,
I am working on moving vdsm.init script to vdsm-tool. But the vdsm.init script uses some of functions from /etc/init.d/functions. So I plan to re-code the /etc/init.d/functions or part of it with python code and also move it to vdsm-tool. Is it okey?
Ah thanks for asking, this is something dear to me :) Basically the init file shouldn't be in python and should look as much as possible like the standard one:
http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=blob;f=template.init
All the rest should be moved to vdsm-tool as:
- check_port_taken
- mk_data_center
- mk_dom_backup
- mk_upgrade_path
- mk_core_path
- mk_run_path
- get_libvirt_conf_item
- test_conflicting_conf
- shutdown_conflicting_srv (on fedora this is taken care by systemd)
- upstart_libvirt
- start_needed_srv (on fedora this is taken care by systemd)
- test_lo
- free_space
- test_space
- bond_dev_available
- load_needed_modules
- test_already_running
- configure_libvirt
- configure_sysctl
Feel free to regroup the actions as you want (maybe it would make sense to have just one function with all the mk_* commands, etc...)
So to answer your question, no, you shouldn't need to re-code the init.d functions.
Thanks,
Got it, thanks Dan and Federico.
On 05/10/2012 03:33 PM, Federico Simoncelli wrote:
----- Original Message -----
From: "Wenyi Gao"wenyi@linux.vnet.ibm.com To:vdsm-devel@lists.fedorahosted.org Sent: Thursday, May 10, 2012 5:36:08 AM Subject: [vdsm] Re-code /etc/init.d/functions script with Python and move it to vdsm-tool
Hi All,
I am working on moving vdsm.init script to vdsm-tool. But the vdsm.init script uses some of functions from /etc/init.d/functions. So I plan to re-code the /etc/init.d/functions or part of it with python code and also move it to vdsm-tool. Is it okey?
Ah thanks for asking, this is something dear to me :) Basically the init file shouldn't be in python and should look as much as possible like the standard one:
http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=blob;f=template.init
All the rest should be moved to vdsm-tool as:
Hi Federico, Dan,
I am working on moving install/uninstall hooks out of vdsm.spec.in file to its own script, the previous patches have been posted to gerrit as links below:
http://gerrit.ovirt.org/#change,4134 http://gerrit.ovirt.org/#change,4135
According to Dan's comment, I am working on the code about encapsulating each logical function into vdsm-tool function too.
Saw the discussion, I'd like to ask you what you think of how to encapsulate it to vdsm-tool, re-code the scripts in python or just put the scripts under the framework of vdsm-tool?
Thanks!
- check_port_taken
- mk_data_center
- mk_dom_backup
- mk_upgrade_path
- mk_core_path
- mk_run_path
- get_libvirt_conf_item
- test_conflicting_conf
- shutdown_conflicting_srv (on fedora this is taken care by systemd)
- upstart_libvirt
- start_needed_srv (on fedora this is taken care by systemd)
- test_lo
- free_space
- test_space
- bond_dev_available
- load_needed_modules
- test_already_running
- configure_libvirt
- configure_sysctl
Feel free to regroup the actions as you want (maybe it would make sense to have just one function with all the mk_* commands, etc...)
So to answer your question, no, you shouldn't need to re-code the init.d functions.
Thanks,
----- Original Message -----
From: "Lei Li" lilei@linux.vnet.ibm.com To: "Federico Simoncelli" fsimonce@redhat.com, "Dan Kenigsberg" danken@redhat.com Cc: wenyi@linux.vnet.ibm.com, vdsm-devel@lists.fedorahosted.org Sent: Tuesday, May 15, 2012 11:37:39 AM Subject: Re: [vdsm] Re-code /etc/init.d/functions script with Python and move it to vdsm-tool
On 05/10/2012 03:33 PM, Federico Simoncelli wrote:
----- Original Message -----
From: "Wenyi Gao"wenyi@linux.vnet.ibm.com To:vdsm-devel@lists.fedorahosted.org Sent: Thursday, May 10, 2012 5:36:08 AM Subject: [vdsm] Re-code /etc/init.d/functions script with Python and move it to vdsm-tool
Hi All,
I am working on moving vdsm.init script to vdsm-tool. But the vdsm.init script uses some of functions from /etc/init.d/functions. So I plan to re-code the /etc/init.d/functions or part of it with python code and also move it to vdsm-tool. Is it okey?
Ah thanks for asking, this is something dear to me :) Basically the init file shouldn't be in python and should look as much as possible like the standard one:
http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=blob;f=template.init
All the rest should be moved to vdsm-tool as:
Hi Federico, Dan,
I am working on moving install/uninstall hooks out of vdsm.spec.in file to its own script, the previous patches have been posted to gerrit as links below:
http://gerrit.ovirt.org/#change,4134 http://gerrit.ovirt.org/#change,4135
According to Dan's comment, I am working on the code about encapsulating each logical function into vdsm-tool function too.
Saw the discussion, I'd like to ask you what you think of how to encapsulate it to vdsm-tool, re-code the scripts in python or just put the scripts under the framework of vdsm-tool?
Using python is preferable.
vdsm-devel@lists.fedorahosted.org