Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
many: drop ubuntu-core-snapd-units package, use release.OnClassic instead #1684
Conversation
zyga
reviewed
Aug 16, 2016
| + if !release.OnClassic { | ||
| + if err := firstbootEnableFirstEther(); err != nil { | ||
| + logger.Noticef("Failed to bring up ethernet: %s", err) | ||
| + } | ||
| } | ||
| // snappy will be in a very unhappy state if this happens, |
zyga
Aug 16, 2016
Contributor
Do you want to skip the whole FirstBoot() code or do you really want to run populateStateFromInstalled()?
mvo5
Aug 16, 2016
Collaborator
Yes, by allowing this we can have firstboot seeds in classic as well. This allows us to e.g. preinstall ubuntu-core or other snaps in classic systems.
chenhan1218
Aug 17, 2016
May I ask an irrelative question to this pull request?
Is there any reason that the system need to enable first ether on firstboot?
I trace the code and found it is not fatal error if enable failed. But system with ethernet not connecting to cable will stuck in dhclient for several minutes at first boot up. (I have leveraged series 16 ubuntu-core image)
|
Overall I love the change. It will simplify packaging and avoid potential disaster in case someone makes a mistake in packaging in the future. I have one question above but otherwise +1 |
niemeyer
reviewed
Aug 24, 2016
| @@ -46,6 +47,11 @@ func (x *cmdBooted) Execute(args []string) error { | ||
| return ErrExtraArgs | ||
| } | ||
| + if release.OnClassic { | ||
| + fmt.Fprintf(Stdout, "Ignoring 'booted' on classic") |
niemeyer
Aug 24, 2016
Contributor
The change looks fine as it's just moving code around, but this still feels like legacy that should go away. We have snapd itself running on boot, and we have a state that is empty / not present to tell us when we did run or not. All of this external "first boot" logic feels unnecessary by now, given that.
Still, feel free to merge it and we can fix that later.
mvo5
Aug 26, 2016
Collaborator
Thanks, yeah, we need to fix this. I created a trello card under "technical debt" to ensure it stays on the radar.
mvo5 commentedAug 16, 2016
Merge the "dangerous" systemd services back into the main snapd
package. Instead of an extra package the code will simpliy check
for release.OnClassic() for dangerous bits like "booted" or when
enabling the first ethernet.
This allows us to run the same firstboot seed.yaml population on
a classic system on first-boot (or first-install of snapd) which
allows us to pre-install ubuntu-core to avoid the extra download
on the first snap install.