Re: [Bug 1834875] Re: cloud-init growpart race with udev

2020-02-25 Thread Ryan Harper
On Tue, Feb 25, 2020 at 2:35 PM Scott Moser wrote: > this seemed to "just work" for me. > http://paste.ubuntu.com/p/93dWDPZfZT/ Ah, I didn't check that there was an existing ubuntu/devel branch. Sorry. I've pushed a MR here: https://code.launchpad.net/~raharper/cloud-utils/+git/cloud-utils/

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-11-07 Thread Dimitri John Ledkov
On Thu, 7 Nov 2019 at 20:05, Scott Moser wrote: > > > > So that means we have this sequence of events: > > > a.) growpart change partition table > > > b.) growpart call partx > > > c.) udev created and events being processed > > > That is not true. whilst sfdisk is deleting, creating, finishing

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-11-07 Thread Dimitri John Ledkov
On Thu, 7 Nov 2019 at 17:50, Ryan Harper <1834...@bugs.launchpad.net> wrote: > > @ddstreet > > Yes, settle does not help. > > Re-triggering udevadm trigger --action=add /sys/class/block/sda > > Would re-run all of them after the partition change has occurred, which > is what I'm currently suggestin

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-11-07 Thread Ryan Harper
On Thu, Nov 7, 2019 at 2:41 PM Dan Streetman wrote: > > Issuing a second > > trigger will repeat this. > > IMO, that's a non-zero amount of time that slows the boot down, so I'd > like > > to avoid that. > > systemd-udev-trigger.serivce retriggers *everything* at boot (except in > an unprivileged

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-11-07 Thread Ryan Harper
On Thu, Nov 7, 2019 at 11:30 AM Dimitri John Ledkov wrote: > > So that means we have this sequence of events: > > a.) growpart change partition table > > b.) growpart call partx > > c.) udev created and events being processed > > That is not true. whilst sfdisk is deleting, creating, finishing

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-11-07 Thread Ryan Harper
On Thu, Nov 7, 2019 at 1:30 PM Dan Streetman wrote: > > Yes, settle does not help. > > Well, I didn't suggest just to settle ;-) > Sorry; long bug thread. > > I'm currently suggesting as a heavy-handed workaround. > > I don't really see why you think this is heavy-handed, but I must be > missi

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-09-03 Thread Dan Watkins
On Mon, Aug 26, 2019 at 03:17:10PM -, Scott Moser wrote: > If there is a race, or a need to wait, it almost certainly is in cloud- > utils (growpart). I would still like us to get a systemd/kernel person to take a look at this, because I think that the race is somewhere further down than cloud

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-09-03 Thread Dan Watkins
On Mon, Aug 26, 2019 at 08:58:46AM -, Tobias Koch wrote: > > (Odds are that whatever causes it to be recreated later in boot would be > > blocked by cloud-init waiting.) > > But that's not happening. The instance does boot normally, the only > service degraded is cloud-init and there is no sig

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-08-26 Thread Ryan Harper
On Mon, Aug 26, 2019 at 4:05 AM Tobias Koch <1834...@bugs.launchpad.net> wrote: > > (Odds are that whatever causes it to be recreated later in boot would be > > blocked by cloud-init waiting.) > > But that's not happening. The instance does boot normally, the only > service degraded is cloud-init

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-08-23 Thread Dan Watkins
On Fri, Aug 23, 2019 at 08:23:06PM -, Tobias Koch wrote: > I may be missing the point, but the symlink in question is eventually > recreated, does that tell us anything? This here Yes, this is more supporting evidence that this is a race condition; the state of the system both before and some

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-08-23 Thread Ryan Harper
On Fri, Aug 23, 2019 at 10:21 AM Dan Watkins wrote: > Looking at the comment timestamps, Dan probably didn't see my comment, > but to reiterate: all the events we expect to be processed _are_ > processed, the issue is that when they are processed they don't always > end up with the correct partit

Re: [Bug 1834875] Re: cloud-init growpart race with udev

2019-08-23 Thread Ryan Harper
On Fri, Aug 23, 2019 at 10:00 AM Dan Streetman wrote: > > Dan had put a udevadm settle in this spot like so > > > > def get_size(filename) > >util.subp(['udevadm', 'settle']) > >os.open() > > if you know you've just changed (e.g.) /dev/sda, possibly its kernel- > generated udev events