Merge ~smoser/cloud-init:bug/1675185-no-apt-on-snappy into cloud-init:master
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | e80dbb80987ba44be2899e34fbbbf7d48389b6b5 | ||||
| Proposed branch: | ~smoser/cloud-init:bug/1675185-no-apt-on-snappy | ||||
| Merge into: | cloud-init:master | ||||
| Diff against target: |
37 lines (+17/-3) 1 file modified
cloudinit/config/cc_apt_configure.py (+17/-3) |
||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ryan Harper | 2017-03-28 | Approve on 2017-03-29 | |
| Server Team CI bot | continuous-integration | Approve on 2017-03-29 | |
|
Review via email:
|
|||
Commit Message
apt_configure: run only when needed.
Do not bother configuring apt if no 'apt' config is provided and either:
a.) running on snappy
b.) there is no 'apt' command (possibly a different distro)
If apt config is provided in either of the above situations, then config
will continue.
LP: #1675185
| Scott Moser (smoser) wrote : | # |
FAILED: Continuous integration, rev:2643c41bd53
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:b735652a9fa
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
The first thing that apply_debconf_
selsets = cfg.get(
if not selsets:
return
So if there is no 'debconf_
If there *is* debconf_selections in the config, then it seems like the proper thing to do is fail trying.
That is slightly different than 'apt' configuration for 2 reasons
a.) apt config is more likely to just be there anyway (such as maas sending it)
b.) there is some "default" apt configuration that we do based on system config.
That said, I think that its probably best for us fail if 'apt' config is specifically given and we are on snappy or there is no 'apt'.
I'm going to update the proposal here to fail if apt config is given.
thoughts?
| Ryan Harper (raharper) wrote : | # |
I personally like an explicit disable; we have it in many other modules; it's simple and clean; even the debconf_selections does that (as you point out).
I agree that if someone puts in debconf_selections or an apt config in user-data, then we should fail; I'm fine with the apt config present failing if there's no apt or system_is_snappy.
Can we do both? (explicit config disable and checking for apt/snappy)?
PASSED: Continuous integration, rev:e80dbb80987
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/


need some tests, and maybe some test case cleanups.