vmware-archive / salt-pack

Salt Package Builder
Apache License 2.0
55 stars 23 forks source link

Add python-systemd to Debian Jessie repository #657

Closed kaaelhaa closed 5 years ago

kaaelhaa commented 5 years ago

With the release of Salt 2019.2.0 our automated deployments of Salt with the virt runner has stopped working.

We're deploying VMs based on the official Debian OpenStack images (as we then don't need to maintain these ourselves). These images does not include the Debian backports repository which is required for resolving the python-systemd dependency.

Please consider adding python-systemd to the Salt Debian repository, as our automated deployments currently are ... not so automated.

dmurphy18 commented 5 years ago

@kaaelhaa The aim of the SaltStack repositories for both Redhat/Amazon/Debian/Ubuntu are to provide Salt for that platform and any dependencies which the OS platform does not supply at a sufficient version for Salt to function. For example: Debian 8.0 did not supply python-systemd initially but now does since v8.5. Python-tornado v4.2.1 was provided initially since versions shipped were insufficient versions for Salt to operate, but subsequently newer versions are now supplied by OS platforms.

It was found during testing, that some conflicts were occurring between the version of python-systemd built by SaltStack and that provided by the Debian OS and it was decided to stop continuing building and providing python-systemd and defer to the version provided by the OS platform, especially since the conflicts prevented installation.

Hope that this explains the reasons for removing it.

myii commented 5 years ago

For Docker, using debian:jessie-backports has worked for us (the reference link directly above).

getSurreal commented 5 years ago

For kitchen tests using vagrant you can inject backports into it.

platforms:
  - name: bento/debian-8.7
    lifecycle:
      post_create:
      - remote: echo 'deb http://deb.debian.org/debian jessie-backports main' | sudo tee -a /etc/apt/sources.list
      - remote: sudo apt-get update
kaaelhaa commented 5 years ago

@dmurphy18 I totally understand your reasoning but I must say I do not agree that python-systemd is part of default Debian 8 (Jessie) distribution.

The package can only be fetched from the jessie-backports repository, which for many reasons is not enabled by default - not event present in /etc/apt/sources.list. You need to manually add it which is exactly what https://github.com/saltstack/salt-pack/issues/657#issuecomment-468413952 and https://github.com/saltstack/salt-pack/issues/657#issuecomment-468754346 does above. This is why I ask you to please reconsider the removal of python-systemd from the Debian Jessie Salt repository, as the current state is a breaking change.

In comparison, Debian 9 (Stretch) has python-systemd in the default repository.

dmurphy18 commented 5 years ago

@kaaelhaa Dug deeper into this issue and you are correct in stating the default Debian 8 (jessie) distribution: my apologies.

From installing Debian 8.7 with a VirtualBox VM python-systemd is available from jessie-backports, for example:
root@t8min:/home/david# apt-cache policy python-systemd python-systemd: Installed: (none) Candidate: 233-1~bpo8+1 Version table: 233-1~bpo8+1 0 100 http://ftp.us.debian.org/debian/ jessie-backports/main amd64 Packages root@t8min:/home/david# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.7 (jessie) Release: 8.7 Codename: jessie root@t8min:/home/david#

The conflict that I encountered is due to using AWS and building on a Debian 8.7 system (without backports explicitly in /etc/apt/sources.list) but AWS is supplying python-systemd as follows:

root@ip-10-200-13-140:/home/admin# apt-cache policy python-systemd python-systemd: Installed: 231-2~bpo8+1 Candidate: 233-1~bpo8+1 Version table: 233-1~bpo8+1 0 750 http://cloudfront.debian.net/debian/ jessie-backports/main amd64 Packages *** 231-2~bpo8+1 0 100 /var/lib/dpkg/status root@ip-10-200-13-140:/home/admin# cat /etc/apt/sources.list deb http://cloudfront.debian.net/debian jessie main contrib non-free deb http://security.debian.org/ jessie/updates main contrib non-free deb http://cloudfront.debian.net/debian jessie-updates main contrib non-free deb http://repo.saltstack.com/apt/debian/8/amd64/latest jessie main root@ip-10-200-13-140:/home/admin#

I failed to check /etc/apt/sources.list.d for backports.list. I shall re-work the build environment for building Jessie to eliminate jessie-backports, which was the original intention, and this should appear in the next point release.

dmurphy18 commented 5 years ago

@kaaelhaa Both of the Salt 2018.3.4 and 2019.2.0 for Debian 8 on amd64 repositories have been updated with a restored python-systemd package.

Sorry for the breakage and thanks for bringing this issue up.

If this resolves your issue, please close or if there is still an issue, please let me know asap.

dmurphy18 commented 5 years ago

@kaaelhaa Closing this since fix has been available for 2 weeks and no issues, Please re-open this issue if the problem reoccurs