Merge ~raharper/cloud-init:fix-lp1619423 into cloud-init:master

Proposed by Ryan Harper
Status: Work in progress
Proposed branch: ~raharper/cloud-init:fix-lp1619423
Merge into: cloud-init:master
Diff against target: 33 lines (+20/-2)
1 file modified
packages/debian/control.in (+20/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Needs Fixing
cloud-init Commiters Pending
Review via email: mp+308555@code.launchpad.net

Description of the change

debian: control.in add explicit package deps

Some builds systems (like Ubuntu-core) use --no-install-recommends and miss a number
of core dependency packages which breaks some core function of cloud-init when the
required binaries are not present. Add these packages as explicit dependencies to
the debian package.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

On Fri, 14 Oct 2016, Ryan Harper wrote:

> Ryan Harper has proposed merging ~raharper/cloud-init:fix-lp1619423 into cloud-init:master.
>
> Requested reviews:
> cloud init development team (cloud-init-dev)
> Related bugs:
> Bug #1619423 in cloud-init: "snappy does not include ssh-import-id preventing cloud-init user-data from importing ssh-keys"
> https://bugs.launchpad.net/cloud-init/+bug/1619423
>
> For more details, see:
> https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/308555
>
> debian: control.in add explicit package deps
>
> Some builds systems (like Ubuntu-core) use --no-install-recommends and miss a number
> of core dependency packages which breaks some core function of cloud-init when the
> required binaries are not present. Add these packages as explicit dependencies to
> the debian package.

This seems broken.
I'm pretty certain you're not supposed to have to depend on any thing
'essential' which includes at least dash and mount.

i only took a quick look.

> --
> You are subscribed to branch cloud-init:master.
>

Revision history for this message
Oliver Grawert (ogra) wrote :

yeah, this pretty much duplicates the ubuntu-core seed (plus adding some MB of deps i guess), growing the core snap by megabytes while taking away the control of the seed is surely not a solution (see comment #1 on the bug it is supposed to solve).

Revision history for this message
Ryan Harper (raharper) wrote :

I'm highly confused.

Our thread there in the bug was:

>> @ryan is there any reason why cloud-init does not actually depend on the
>> package if it needs it to be functional ?
>
>
>I believe it's part of the ubuntu-server seed, so it's expected to be part
>of the server image
>Or at least the cloud-image, which of course includes cloud-init.

@ryan: well, if it breaks core functionality of cloud-init to not have it, then not having it as dependency is per definition a packaging bug ...

So, here I am putting the explicit dependencies on the package; Scott says this is wrong; you say I'm taking away the control of the seed.

Please tell me what I need to do so that when we include cloud-init it has the commands it needs to deliver it's core function (which I'm defining by the set of config modules it will run by default as well as tools needed to acquire data sources etc).

~raharper/cloud-init:fix-lp1619423 updated
a66e60e... by Ryan Harper

Update deps; skip packages marked Essential

7a59fa8... by Ryan Harper

Rework dep list to drop any package marked 'Essential'

Closer inspection of config modules to add missing commands
that are part of cloud-init core setup and config.

- Dropped any package tagged as 'Essential'

Revision history for this message
Scott Moser (smoser) wrote :

$ cat go.sh
#!/bin/sh
deps="
apt cloud-guest-utils coreutils dash debconf e2fsprogs gnupg2 hostname
ifupdown iproute2 locales lsb-release mount net-tools passwd procps sed
ssh-import-id systemd udev
"
for dep in $deps; do
   apt-cache show $dep | grep -qi "^Essential:" && r=essential || r=not
   printf "%-25s %s\n" "$dep" "$r"
done

$ sh ./go.sh
apt not
cloud-guest-utils not
coreutils essential
dash essential
debconf not
e2fsprogs essential
gnupg2 not
hostname essential
ifupdown not
iproute2 not
locales not
lsb-release not
mount essential
net-tools not
passwd not
procps not
sed essential
ssh-import-id not
systemd not
udev not

So, todo here is:
a.) anything 'essential' does not have to be listed as a depends. Its assumed part of a Ubuntu system.
b.) That leaves the others...
Some that I think we should add for sure:
 - net-tools (and then subsequently remove it by dropping use of ifconfig in favor of ip)
 - iproute2: definitely should list this.
apt : seems like this should not be essential given snappy. We use it if its there.
 - systemd: we should jsut not depend on this, but use the right init system wherever we are (could add systemd-init|upstart-init... but probably there *is* an init system).
 - udev: i guess depend on it if we use it.

Revision history for this message
Ryan Harper (raharper) wrote :

On Tue, Oct 18, 2016 at 2:49 PM, Scott Moser <email address hidden> wrote:

> $ cat go.sh
> #!/bin/sh
> deps="
> apt cloud-guest-utils coreutils dash debconf e2fsprogs gnupg2 hostname
> ifupdown iproute2 locales lsb-release mount net-tools passwd procps sed
> ssh-import-id systemd udev
> "
> for dep in $deps; do
> apt-cache show $dep | grep -qi "^Essential:" && r=essential || r=not
> printf "%-25s %s\n" "$dep" "$r"
> done
>
> $ sh ./go.sh
> apt not
> cloud-guest-utils not
> coreutils essential
> dash essential
> debconf not
> e2fsprogs essential
> gnupg2 not
> hostname essential
> ifupdown not
> iproute2 not
> locales not
> lsb-release not
> mount essential
> net-tools not
> passwd not
> procps not
> sed essential
> ssh-import-id not
> systemd not
> udev not
>
> So, todo here is:
> a.) anything 'essential' does not have to be listed as a depends. Its
> assumed part of a Ubuntu system.
>

ACK

> b.) That leaves the others...
> Some that I think we should add for sure:
> - net-tools (and then subsequently remove it by dropping use of ifconfig
> in favor of ip)
>

Do we want to require the dropping of ifconfig to this PR? If so, that's
fine but I want to be clear on the TODO.

> - iproute2: definitely should list this.
>

ACK

> apt : seems like this should not be essential given snappy. We use it if
> its there.
>

ACK, move to recommends (as well as recommend snapd?)

> - systemd: we should jsut not depend on this, but use the right init
> system wherever we are (could add systemd-init|upstart-init... but probably
> there *is* an init system).
>

ACK

> - udev: i guess depend on it if we use it.
>

ACK: cc_disk_setup uses udevadm

>
> --
> https://code.launchpad.net/~raharper/cloud-init/+git/
> cloud-init/+merge/308555
> You are the owner of ~raharper/cloud-init:fix-lp1619423.
>

~raharper/cloud-init:fix-lp1619423 updated
a8495d1... by Ryan Harper

apt is not required; ifupdown is replaced with iproute2

Revision history for this message
Ryan Harper (raharper) wrote :

On Tue, Oct 18, 2016 at 3:03 PM, Ryan Harper <email address hidden>
wrote:

>
>
> On Tue, Oct 18, 2016 at 2:49 PM, Scott Moser <email address hidden> wrote:
>
>> $ cat go.sh
>> #!/bin/sh
>> deps="
>> apt cloud-guest-utils coreutils dash debconf e2fsprogs gnupg2 hostname
>> ifupdown iproute2 locales lsb-release mount net-tools passwd procps sed
>> ssh-import-id systemd udev
>> "
>> for dep in $deps; do
>> apt-cache show $dep | grep -qi "^Essential:" && r=essential || r=not
>> printf "%-25s %s\n" "$dep" "$r"
>> done
>>
>> $ sh ./go.sh
>> apt not
>> cloud-guest-utils not
>> coreutils essential
>> dash essential
>> debconf not
>> e2fsprogs essential
>> gnupg2 not
>> hostname essential
>> ifupdown not
>> iproute2 not
>> locales not
>> lsb-release not
>> mount essential
>> net-tools not
>> passwd not
>> procps not
>> sed essential
>> ssh-import-id not
>> systemd not
>> udev not
>>
>> So, todo here is:
>> a.) anything 'essential' does not have to be listed as a depends. Its
>> assumed part of a Ubuntu system.
>>
>
> ACK
>
>
>> b.) That leaves the others...
>> Some that I think we should add for sure:
>> - net-tools (and then subsequently remove it by dropping use of ifconfig
>> in favor of ip)
>>
>
> Do we want to require the dropping of ifconfig to this PR? If so, that's
> fine but I want to be clear on the TODO.
>

Note that net-tools is compatible with freebsd ... so, dropping net-tools
requires replacement of uses of route, ifconfig and others
and adding runtime checks to pick the right tool and additional parsers;
the old parser for ifconfig/route/netstat output and a
new one for ip.

I'd like to defer dropping this I think; rather we need to have some sort
of distro object lookup for the right "tools"

Ryan

Revision history for this message
Scott Moser (smoser) wrote :

yes. deferring is fine. i meant at some point in the future.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

moved this to work in progress.
i think that is where we are right now..
feel free to re-submit if needed.
h

Unmerged commits

a8495d1... by Ryan Harper

apt is not required; ifupdown is replaced with iproute2

7a59fa8... by Ryan Harper

Rework dep list to drop any package marked 'Essential'

Closer inspection of config modules to add missing commands
that are part of cloud-init core setup and config.

- Dropped any package tagged as 'Essential'

a66e60e... by Ryan Harper

Update deps; skip packages marked Essential

a55ae1f... by Ryan Harper

debian: add explicit dependencies for required binaries

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/packages/debian/control.in b/packages/debian/control.in
2index b58561e..10491ae 100644
3--- a/packages/debian/control.in
4+++ b/packages/debian/control.in
5@@ -21,8 +21,26 @@ Architecture: all
6 Depends: procps,
7 ${python},
8 ${misc:Depends},
9- ${${python}:Depends}
10-Recommends: eatmydata, sudo, software-properties-common, gdisk
11+ ${${python}:Depends},
12+ ca-certificates,
13+ cloud-guest-utils,
14+ debconf,
15+ gdisk,
16+ gnupg1 | gnupg2,
17+ iproute2,
18+ locales,
19+ lsb-release,
20+ net-tools,
21+ passwd,
22+ procps,
23+ software-properties-common,
24+ ssh-import-id,
25+ sudo,
26+ tzdata,
27+ udev,
28+ upstart | systemd,
29+ util-linux
30+Recommends: eatmydata
31 XB-Python-Version: ${python:Versions}
32 Description: Init scripts for cloud instances
33 Cloud instances need special scripts to run during initialisation

Subscribers

People subscribed via source and target branches