Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
firstboot: do not overwrite any existing netplan config #1901
Conversation
mvo5
reviewed
Sep 14, 2016
| @@ -69,16 +69,19 @@ network: | ||
| // be run as part of the config-changed hook and read the snap's | ||
| // config to determine the netplan config to write. | ||
| func InitialNetworkConfig() error { | ||
| + // If the config is already present, don't overwrite it. See | ||
| + // https://bugs.launchpad.net/snappy/+bug/1623119. | ||
| + if _, err := os.Stat(netplanConfigFile); err == nil { |
mvo5
Sep 14, 2016
Collaborator
You may consider using osutil.FileExists() for this, but I guess your version is more go-ish ;)
mwhudson
Sep 14, 2016
Contributor
Too long spent coding with only the standard library available? Would you like me to change it?
mvo5
reviewed
Sep 14, 2016
|
|
|
Fwiw, I think the firstboot failure is actually an incorrect time that is very off in the dragonboard. This means that the assertion can not be checked because it is only valid within a certain timeframe. |
I saw this happen in kvm with an image I'd made myself with a custom ubuntu-core snap too, is that expected? |
|
I'm wondering if we should delay starting things until the netplan config exists. in any case, |
mwhudson commentedSep 13, 2016
Works around https://bugs.launchpad.net/snappy/+bug/1623119
Not sure if this is entirely appropriate but its probably an improvement.