[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-22 Thread Dimitri John Ledkov
Do we need this in the core snap too, or just core18 images? I.e. are all appliance images core18+snapd based? ** Changed in: subiquity (Ubuntu Bionic) Status: Confirmed => In Progress ** Changed in: subiquity Status: In Progress => Fix Released ** No longer affects: subiquity

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-07 Thread Ian Johnson
I verified that mwhudson's PR is sufficient for UC20 at least, provided it is changed slightly to account for the actual JSON structure. I built a core20 snap with the new python dependencies that console-conf has, and updated the things that the PR changes in the core20 snap and built a snap with

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-03 Thread Ian Johnson
To be clear from my first comment, when seeding the lxd snap, `snap managed` is false, at least on UC20 and UC18. I did not have a chance to test UC16, but it should not be managed on UC16 either... If it is that is indeed a snapd bug, but absent evidence of that I don't think that there is a

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-03 Thread Oliver Grawert
ok, answering myself again: https://github.com/lxc/lxd-pkg-snap/blob/latest- edge/snapcraft/commands/daemon.start#L192 which simply calls: chroot /var/lib/snapd/hostfs/ \ useradd --system -M -N --home /var/snap/lxd/common/lxd \ --shell /bin/false --extrausers lxd || true i dont see how the

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-03 Thread Oliver Grawert
while ignoring UID's below 1000 might help in the short term, the "managed" state has a lot more meanings in brand stores and we will likely encounter more breakage introduced by it when customers pre-seed lxd on branded device images so this side of things needs to still be examined. the lxd user

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Stéphane Graber
https://paste.ubuntu.com/p/Y9gY9x9w3y/ for more correct indent :) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1881588 Title: pre-seeding lxd on Core appliances breaks console-conf user creation

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Stéphane Graber
Yeah, the new logic should work fine. An alternative for the older logic would be to skip uid < 1000 so we ignore system users. Applying something like this worked here: --- /usr/share/subiquity/console_conf/controllers/identity.py 2018-08-07 15:07:53.0 + +++ identity.py

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Michael Hudson-Doyle
So I was confused here, I thought that console-conf wasn't running but it is running but not letting you configure an owner. My branch should still help with this. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Stéphane Graber
cat /var/lib/snapd/state.json | jq .data.auth.users ^ this would be interesting to see as my understanding is that this being "null" means managed is false whereas if it shows something, then managed is true ** Changed in: snapd Status: New => Invalid -- You received this bug

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Stéphane Graber
Let's re-open the snapd side of this then. ** Changed in: snapd Status: Invalid => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1881588 Title: pre-seeding lxd on Core appliances breaks

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Michael Hudson-Doyle
Yeah, so I think there's two bugs here: 1) having the lxd snap around should not make `snap managed` be true (this is a bug in snapd I think, although xnox said this might have been fixed?) 2) console-conf should never suggest that the user logs in as lxd@ My branch fixes 2). If 1) unexpectedly

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Oliver Grawert
answering my own question: ogra@localhost:~$ grep managed /usr/share/subiquity/console-conf-wrapper if [ "$(snap managed)" = "true" ]; then ogra@localhost:~$ grep PRETTY /etc/os-release PRETTY_NAME="Ubuntu Core 18" -- You received this bug notification because you are a member of Ubuntu Bugs,

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Oliver Grawert
i was thinking the same when i looked at your patch (and noticed the move-around of the "snap managed" code)... are we sure that version of the code is actually in core18 ? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-02 Thread Michael Hudson-Doyle
There's something I don't understand about this bug though: it must be that having the lxd snap seeded causes "snap managed" to be "true". That seems wrong? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-01 Thread Michael Hudson-Doyle
I think https://github.com/CanonicalLtd/subiquity/pull/794 implements the logic described in comment #6 but I've entirely forgotten how to test this code! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-01 Thread Michael Hudson-Doyle
** Changed in: subiquity Status: Confirmed => In Progress ** Changed in: subiquity Assignee: (unassigned) => Michael Hudson-Doyle (mwhudson) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-07-01 Thread Oliver Grawert
sadly this isnt true anymore (not that the slow boards got faster but we rather started to ignore that fact), all images nowadays run cloud-init by default so python is kind of mandatory and gets executed anyway ... with the focus on raspberry pi the actual embedded hardware is rather ignored. --

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-30 Thread Michael Hudson-Doyle
IIRC one of the reasons console-conf-wrapper is implemented in shell is because some of our target platforms were too slow / memory constrained to run python as part of the boot process? Is that still true? Because this is starting to get a little complicated for shell now... -- You received

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-27 Thread Francis Ginther
** Tags added: id-5ef638e8ed708765e909cfe8 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1881588 Title: pre-seeding lxd on Core appliances breaks console-conf user creation To manage notifications

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-26 Thread Stéphane Graber
This getting fixed in core18 (at least) is a blocker for 3 Ubuntu Core appliances we're currently preparing so it'd be great if we could get a fix rolled out soon! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-26 Thread Dimitri John Ledkov
** Changed in: subiquity (Ubuntu Xenial) Status: Incomplete => Confirmed ** Changed in: subiquity (Ubuntu Bionic) Status: Incomplete => Confirmed ** Changed in: subiquity Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-24 Thread Ian Johnson
I have discussed this and upon closer inspection, we actually we do have an API for console-conf to get the username of a managed device, but the logic that console-conf should follow is a bit more convoluted because eventually we may have devices that are managed (and thus should not allow

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-15 Thread Claudio Matsuoka
** Changed in: snapd Status: New => Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1881588 Title: pre-seeding lxd on Core appliances breaks console-conf user creation To manage

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-15 Thread Ian Johnson
Assigning the snapd task to me, I need to chat with Samuele about how console-conf can use the snapd REST API to get the username of a created user (if there is one). ** Changed in: snapd Assignee: (unassigned) => Ian Johnson (anonymouse67) -- You received this bug notification because you

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-15 Thread Dimitri John Ledkov
waiting on more advice how console-conf (should or should not) query managed state, available users, and if those users can ssh in. ** Changed in: subiquity (Ubuntu Xenial) Status: New => Incomplete ** Changed in: subiquity (Ubuntu Bionic) Status: New => Incomplete -- You

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-13 Thread Oliver Grawert
i dont think there is a snap command to get the managed state (there is "snap known system-user" but that seems to only work if the user was actually created with an assertion) if you actually want shell instead of a simple python http query: root@pi4:~# cat is-managed.sh #! /bin/sh

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-12 Thread Dimitri John Ledkov
** Changed in: snapd Status: Invalid => New ** Changed in: subiquity Status: New => Incomplete ** Changed in: subiquity (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-12 Thread Dimitri John Ledkov
Currently consoleconf is not using snapd apis to determine if the machine is managed, and what are the user ids managing the system. Can snapd team please double check which commands / APIs should be used? I.e. what shall we use to query if the machine is managed (and thus show/skip console-conf

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-12 Thread Dimitri John Ledkov
** Also affects: subiquity Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1881588 Title: pre-seeding lxd on Core appliances breaks console-conf user

[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation

2020-06-12 Thread Oliver Grawert
** Project changed: subiquity => subiquity (Ubuntu) ** Also affects: subiquity (Ubuntu Bionic) Importance: Undecided Status: New ** Also affects: subiquity (Ubuntu Xenial) Importance: Undecided Status: New -- You received this bug notification because you are a member of