Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Wednesday 05 September 2012 11:17 PM, Ritesh Raj Sarraf wrote: > On Wednesday 05 September 2012 11:13 PM, Peter Gervai wrote: >> > Upstart works and requires the patch, but as far as I see it's not >> > really upstarty: it closely emulates sysvinit and doesn't do neither >> > event driven runs nor parallel processing, so no surprise here. >> > >> > For systemd I have to pull up to sid the test system... > The current init script will show you no difference even when run with > systemd. What you need is to write a systemd .service for open-iscsi > that should honor events and call helper applications (in this case > vgchange). By the current explanation of 'settle' command in the manpage, ideally it should wait. But it does not. udevadm settle [options] Watches the udev event queue, and exits if all current events are handled. --timeout=seconds Maximum number of seconds to wait for the event queue to become empty. The default value is 120 seconds. A value of 0 will check if the queue is empty and always return immediately. Now, we don't call it with any value, which would mean that it waits for 120 seconds, which I doubt happens. Either the manpage is outdated or else settle is run quick before the queue even gets populated. Does keeping a sleep of 3 or 4 seconds in between starttargets() and 'udevadm settle' help? -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." signature.asc Description: OpenPGP digital signature
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Wednesday 05 September 2012 11:13 PM, Peter Gervai wrote: > Upstart works and requires the patch, but as far as I see it's not > really upstarty: it closely emulates sysvinit and doesn't do neither > event driven runs nor parallel processing, so no surprise here. > > For systemd I have to pull up to sid the test system... The current init script will show you no difference even when run with systemd. What you need is to write a systemd .service for open-iscsi that should honor events and call helper applications (in this case vgchange). -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." signature.asc Description: OpenPGP digital signature
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Wed, Sep 5, 2012 at 7:02 PM, Ritesh Raj Sarraf wrote: > On Wednesday 05 September 2012 06:44 PM, Peter Gervai wrote: >> Interesting; popcon says systemd 600+ installed while systemd-sysv is >> around 70; this is versus upstart 250 installs. I'll try to check >> them. > I guess most are still passing it as the kernel argument and exploring > it. No one wants a broken init. Probably. Upstart works and requires the patch, but as far as I see it's not really upstarty: it closely emulates sysvinit and doesn't do neither event driven runs nor parallel processing, so no surprise here. For systemd I have to pull up to sid the test system... Peter -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Wednesday 05 September 2012 06:44 PM, Peter Gervai wrote: > Interesting; popcon says systemd 600+ installed while systemd-sysv is > around 70; this is versus upstart 250 installs. I'll try to check > them. I guess most are still passing it as the kernel argument and exploring it. No one wants a broken init. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." signature.asc Description: OpenPGP digital signature
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Wed, Sep 5, 2012 at 7:49 AM, Ritesh Raj Sarraf wrote: > On Wednesday 05 September 2012 01:23 AM, grin wrote: >> Which init do you particularly have in mind? I can install anything on my >> test >> VMs until I send them to oblivion. :-) [I'll check them though.] > systemd seems to have the most interest right now. Interesting; popcon says systemd 600+ installed while systemd-sysv is around 70; this is versus upstart 250 installs. I'll try to check them. Peter -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Wednesday 05 September 2012 01:23 AM, grin wrote: > Which init do you particularly have in mind? I can install anything on my test > VMs until I send them to oblivion. :-) [I'll check them though.] systemd seems to have the most interest right now. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." signature.asc Description: OpenPGP digital signature
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Tue, 04 Sep 2012 22:33:58 +0530 Ritesh Raj Sarraf wrote: > The patch looks okay to me. But I am not sure which way we want to go. A > better approach could be to use a udev rule. Also someone needs to test > this scenario with the newer event based init daemons. Mine was a quick and dirty hack but out of necessity: without it the startup fails, and it's been failing in the last year or so. Yesterday was the day I was able to spend a few hours on testing and finalising. I'm not against udev rules but I didn't master 'em so I don't want to mess around it. Which init do you particularly have in mind? I can install anything on my test VMs until I send them to oblivion. :-) [I'll check them though.] peter signature.asc Description: PGP signature
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
On Monday 03 September 2012 10:32 PM, Peter Gervai wrote: > My devices reside on multiple hosts using all kinds of troublesome parameters > (drbd, slow links, virtualised machines, etc) > which results 2-3 seconds between iscsi login and the devices recognised by > the kernel. open-iscsi start script wasn't > quite patient, declared no vg's available (in fact no pv's at the point of > time), and failed to mount the whole > shebang. > > This patch make it a bit more patient, trying 10 times 1 second to get it > done. These parameters could be > configured, changed etc., it is just good for the average around me. Should > not hurt anyone I guess, unless > I screwed up the script, which is quite possible. The patch looks okay to me. But I am not sure which way we want to go. A better approach could be to use a udev rule. Also someone needs to test this scenario with the newer event based init daemons. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." signature.asc Description: OpenPGP digital signature
Bug#686595: open-iscsi: Try harder to start LVM when the device synchronisation take more time
Package: open-iscsi Version: 2.0.873-3 Severity: important Tags: patch My devices reside on multiple hosts using all kinds of troublesome parameters (drbd, slow links, virtualised machines, etc) which results 2-3 seconds between iscsi login and the devices recognised by the kernel. open-iscsi start script wasn't quite patient, declared no vg's available (in fact no pv's at the point of time), and failed to mount the whole shebang. This patch make it a bit more patient, trying 10 times 1 second to get it done. These parameters could be configured, changed etc., it is just good for the average around me. Should not hurt anyone I guess, unless I screwed up the script, which is quite possible. Thanks, Peter diff -r f060bdd7bf69 init.d/open-iscsi --- a/init.d/open-iscsi Mon Sep 03 18:27:47 2012 +0200 +++ b/init.d/open-iscsi Mon Sep 03 18:53:13 2012 +0200 @@ -117,7 +117,13 @@ log_daemon_msg "Activating iSCSI volume groups" for vg in "$LVMGROUPS"; do log_progress_msg $vg - vgchange --available=y $vg + for try in `seq 1 10`; do + if vgchange --available=y $vg; then break; fi + log_daemon_msg "$vg is not yet available, waiting 1 second... (try $try)" + # you may have to raise repeat and sleep if your dev syncronises even slower + sleep 1; + done + done log_end_msg 0 fi -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org