Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(python): define python3 package for OpenSuse Tumbleweed #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

baby-gnu
Copy link
Contributor

@baby-gnu baby-gnu commented Jan 20, 2021

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

#82

Describe the changes you're proposing

Override the python package name for openSUSE Tumbleweed-20210118.

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

This target architecture is not tested by Kitchen yet.

@myii
Copy link
Contributor

myii commented Jan 20, 2021

@baby-gnu See #82 (comment).

@baby-gnu baby-gnu force-pushed the feature/support-opensuse-tumbleweed branch 2 times, most recently from 9c0f00d to 490593e Compare January 20, 2021 18:30
Copy link
Contributor

@aboe76 aboe76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work @baby-gnu

@myii
Copy link
Contributor

myii commented Jan 20, 2021

@baby-gnu @aboe76 I managed to build some images to test with and there's a bit more to do here to get it working with Tumbleweed fully, it seems. The good news first; in terms of this PR, python38-libvirt-python is installed successfully. However, have a failure with the very first (server) package installation.

https://gitlab.com/myii/libvirt-formula/-/pipelines/244618117

The same error for each:

Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: libvirt-daemon-qemu-6.10.0-4.1.x86_64 requires libvirt-daemon-driver-qemu = 6.10.0-4.1, but this requirement cannot be provided
  not installable providers: libvirt-daemon-driver-qemu-6.10.0-4.1.i586[repo-oss]
                   libvirt-daemon-driver-qemu-6.10.0-4.1.x86_64[repo-oss]
 Solution 1: deinstallation of busybox-gzip-1.32.1-14.2.noarch
 Solution 2: do not install libvirt-daemon-qemu-6.10.0-4.1.x86_64
 Solution 3: break libvirt-daemon-qemu-6.10.0-4.1.x86_64 by ignoring some of its dependencies

Confirmed that locally as well.

@aboe76
Copy link
Contributor

aboe76 commented Jan 21, 2021

@myii I don't know why busybox-gzip is a conflict for libvirt, seems strange...

@baby-gnu
Copy link
Contributor Author

I managed to build some images to test with and there's a bit more to do here to get it working with Tumbleweed fully, it seems.

I made a test with your default-opensuse-tumbleweed-latest-master-py3 container, I installed gzip and removed busybox-gzip

       Summary for local
       ------------
       Succeeded: 8 (changed=4)
       Failed:    0
       ------------
       Total states run:     8
       Total run time:  40.764 s
       Downloading files from <default-opensuse-tumbleweed-latest-master-py3>
       Finished converging <default-opensuse-tumbleweed-latest-master-py3> (0m48.44s).

So, I'm wondering why the image is installed with busybox-gzip.

After that, I need to fix the tests:

  ×  Libvirt packages: verify installed packages (1 failed)
     ✔  System Package libvirt-daemon-qemu is expected to be installed
     ✔  System Package qemu-kvm is expected to be installed
     ✔  System Package libguestfs0 is expected to be installed
     ×  System Package python3-libvirt-python is expected to be installed
     expected that `System Package python3-libvirt-python` is installed
[…]
  ×  Libvirt service: verify running service (2 failed)
     ×  Service libvirtd is expected to be enabled
     expected that `Service libvirtd` is enabled
     ×  Service libvirtd is expected to be running
     expected that `Service libvirtd` is running

@baby-gnu
Copy link
Contributor Author

After that, I need to fix the tests:

The inspec.platform does not seems to support the Tumbleweed OpenSuse:

  • inspec.platform[:name]opensuse
  • inspec.platform[:family]suse
  • inspec.platform[:release]''

We should find a way to detect this platform with the system library.

@myii
Copy link
Contributor

myii commented Jan 25, 2021

We should find a way to detect this platform with the system library.

@baby-gnu There's a long story behind it, which I need to submit in a bug report to the InSpec folks. Long story short, for our use, I've chatted with @javierbertoli about something that can be done in the salt-image-builder, so there will be a resolution to this as soon as I can get those changes merged. Then those images can be used for testing here and other formulas.

@myii I don't know why busybox-gzip is a conflict for libvirt, seems strange...

@aboe76 I've also checked this and it is getting pulled in as a dependency of the systemd package:

a71f680dc614:/ # zypper install --no-recommends systemd
Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata .............................................................................................................[done]
Building repository 'openSUSE-Tumbleweed-Non-Oss' cache ..................................................................................................................[done]
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata .................................................................................................................[done]
Building repository 'openSUSE-Tumbleweed-Oss' cache ......................................................................................................................[done]
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata ..............................................................................................................[done]
Building repository 'openSUSE-Tumbleweed-Update' cache ...................................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 55 NEW packages are going to be installed:
  busybox busybox-gzip chkstat dbus-1 diffutils kbd kbd-legacy kmod libapparmor1 libargon2-1 libaudit1 libblkid1 libcap-ng0 libcrypt1 libcryptsetup12 libdbus-1-3
  libdevmapper1_03 libeconf0 libexpat1 libfdisk1 libjson-c5 libkmod2 libmount1 libnsl2 libpcre2-8-0 libpkgconf3 libqrencode4 libseccomp2 libsemanage1 libsepol1 libsmartcols1
  libtirpc-netconfig libtirpc3 libutempter0 libuuid1 pam pam-config perl-base permissions permissions-config pkgconf pkgconf-m4 pkgconf-pkg-config shadow suse-module-tools
  system-group-hardware system-group-kvm systemd systemd-default-settings systemd-default-settings-branding-SLE systemd-presets-branding-MicroOS systemd-presets-common-SUSE
  sysuser-shadow udev util-linux

The following 2 packages require a system reboot:
  dbus-1 systemd

55 new packages to install.
Overall download size: 16.6 MiB. Already cached: 0 B. After the operation, additional 47.3 MiB will be used.

    Note: System reboot required.

Whereas this doesn't happen on openSUSE Leap 15.2:

8bd7cd912405:/ # zypper install --no-recommends systemd
Retrieving repository 'Non-OSS Repository' metadata ......................................................................................................................[done]
Building repository 'Non-OSS Repository' cache ...........................................................................................................................[done]
Retrieving repository 'Main Repository' metadata .........................................................................................................................[done]
Building repository 'Main Repository' cache ..............................................................................................................................[done]
Retrieving repository 'Main Update Repository' metadata ..................................................................................................................[done]
Building repository 'Main Update Repository' cache .......................................................................................................................[done]
Retrieving repository 'Update Repository (Non-Oss)' metadata .............................................................................................................[done]
Building repository 'Update Repository (Non-Oss)' cache ..................................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 22 NEW packages are going to be installed:
  blog dbus-1 kbd kbd-legacy kmod libapparmor1 libargon2-1 libcryptsetup12 libdbus-1-3 libdevmapper1_03 libexpat1 libjson-c3 libkmod2 libqrencode4 libseccomp2 pam-config
  pkg-config systemd systemd-presets-branding-MicroOS systemd-presets-common-SUSE sysvinit-tools udev

The following 3 packages require a system reboot:
  dbus-1 systemd udev

22 new packages to install.
Overall download size: 7.7 MiB. Already cached: 0 B. After the operation, additional 25.5 MiB will be used.

    Note: System reboot required.

We'd need to figure out what's going on there.

@myii
Copy link
Contributor

myii commented Jan 25, 2021

We should find a way to detect this platform with the system library.

@baby-gnu I forgot to mention, I've got a fix for the system.rb library as well.

@aboe76
Copy link
Contributor

aboe76 commented Jan 25, 2021

@myii could you try it with installing "busybox-static" first, before systemd.

@myii
Copy link
Contributor

myii commented Jan 25, 2021

@myii could you try it with installing "busybox-static" first, before systemd.

@aboe76 It didn't make a difference:

a71f680dc614:/ # zypper install --no-recommends busybox-static
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  busybox-static

1 new package to install.
Overall download size: 1.1 MiB. Already cached: 0 B. After the operation, additional 2.4 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving package busybox-static-1.32.1-1.1.x86_64                                                                                        (1/1),   1.1 MiB (  2.4 MiB unpacked)
Retrieving: busybox-static-1.32.1-1.1.x86_64.rpm .............................................................................................................[done (9.4 KiB/s)]

Checking for file conflicts: .............................................................................................................................................[done]
(1/1) Installing: busybox-static-1.32.1-1.1.x86_64 .......................................................................................................................[done]
a71f680dc614:/ # zypper install --no-recommends systemd               
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 55 NEW packages are going to be installed:
  busybox busybox-gzip chkstat dbus-1 diffutils kbd kbd-legacy kmod libapparmor1 libargon2-1 libaudit1 libblkid1 libcap-ng0 libcrypt1 libcryptsetup12 libdbus-1-3
  libdevmapper1_03 libeconf0 libexpat1 libfdisk1 libjson-c5 libkmod2 libmount1 libnsl2 libpcre2-8-0 libpkgconf3 libqrencode4 libseccomp2 libsemanage1 libsepol1 libsmartcols1
  libtirpc-netconfig libtirpc3 libutempter0 libuuid1 pam pam-config perl-base permissions permissions-config pkgconf pkgconf-m4 pkgconf-pkg-config shadow suse-module-tools
  system-group-hardware system-group-kvm systemd systemd-default-settings systemd-default-settings-branding-SLE systemd-presets-branding-MicroOS systemd-presets-common-SUSE
  sysuser-shadow udev util-linux

The following 2 packages require a system reboot:
  dbus-1 systemd

55 new packages to install.
Overall download size: 16.6 MiB. Already cached: 0 B. After the operation, additional 47.3 MiB will be used.

    Note: System reboot required.

@myii
Copy link
Contributor

myii commented Jan 25, 2021

@aboe76 To play around for yourself:

$ docker run -it --entrypoint="/bin/bash" opensuse/tumbleweed:latest

@aboe76
Copy link
Contributor

aboe76 commented Jan 25, 2021

This is strange, I'm running an opensuse tumbleweed desktop without this busybox-gzip package installed...

@baby-gnu
Copy link
Contributor Author

This is strange, I'm running an opensuse tumbleweed desktop without this busybox-gzip package installed...

It may be related to the way kiwi build the OpenSuse docker image?

@aboe76
Copy link
Contributor

aboe76 commented Jan 26, 2021

found it, just install gzip first and then systemd.

@aboe76
Copy link
Contributor

aboe76 commented Jan 26, 2021

busybox-gzip and the normal gzip are in conflict, gzip is a depency of libvirt-daemon-driver-qemu...it doesn't accept busybox-gzip version.

@myii
Copy link
Contributor

myii commented Jan 26, 2021

found it, just install gzip first and then systemd.

@aboe76 Nice work! I'm just finishing off the merge request for the salt-image-builder, for these new Tumbleweed images. I've just tested and it's OK to install them both at the same time:

9b0d762be94f:/ # zypper install --no-recommends gzip systemd
Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata .............................................................................................................[done]
Building repository 'openSUSE-Tumbleweed-Non-Oss' cache ..................................................................................................................[done]
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata .................................................................................................................[done]
Building repository 'openSUSE-Tumbleweed-Oss' cache ......................................................................................................................[done]
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata ..............................................................................................................[done]
Building repository 'openSUSE-Tumbleweed-Update' cache ...................................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 54 NEW packages are going to be installed:
  chkstat dbus-1 diffutils gzip kbd kbd-legacy kmod libapparmor1 libargon2-1 libaudit1 libblkid1 libcap-ng0 libcrypt1 libcryptsetup12 libdbus-1-3 libdevmapper1_03 libeconf0
  libexpat1 libfdisk1 libjson-c5 libkmod2 libmount1 libnsl2 libpcre2-8-0 libpkgconf3 libqrencode4 libseccomp2 libsemanage1 libsepol1 libsmartcols1 libtirpc-netconfig libtirpc3
  libutempter0 libuuid1 pam pam-config perl-base permissions permissions-config pkgconf pkgconf-m4 pkgconf-pkg-config shadow suse-module-tools system-group-hardware
  system-group-kvm systemd systemd-default-settings systemd-default-settings-branding-SLE systemd-presets-branding-MicroOS systemd-presets-common-SUSE sysuser-shadow udev
  util-linux

The following 2 packages require a system reboot:
  dbus-1 systemd

54 new packages to install.
Overall download size: 16.1 MiB. Already cached: 0 B. After the operation, additional 46.4 MiB will be used.

    Note: System reboot required.

saltstack-formulas-github pushed a commit to netmanagers/salt-image-builder that referenced this pull request Jan 26, 2021
Installing `gzip` in Tumbleweed to avoid strange packaging conflicts
involving `busybox-gzip` instead, see:
* saltstack-formulas/libvirt-formula#83 (comment)
saltstack-formulas-github pushed a commit to netmanagers/salt-image-builder that referenced this pull request Jan 26, 2021
# [1.20.0](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/compare/v1.19.0...v1.20.0) (2021-01-26)

### Build System

* **requirements:** update package versions used for `testinfra` ([5cb4acb](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/5cb4acb4a9ecf36586e8d17628b2583d12ae3f6c))

### Continuous Integration

* **dockerfile.*:** avoid installing recommended packages ([b3680ec](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/b3680ecc460492834aaa74443b355e96121e9fe3))
* **dockerfile.zyp:** apply workaround for Tumbleweed InSpec bug ([a5e931a](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/a5e931afaeb01ff9c3ce755d47416026223bc14b))
* **dockerfile.zyp:** reset bootstrap script source [skip ci] ([52f797e](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/52f797e73e61f2a0a434460657cb9905fc41b5e4))
* **gitlab-ci:** avoid using Docker caching for Tiamat builds ([bc38e46](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/bc38e461f6da6293b61f729047ae52f2840e48a2))
* **gitlab-ci:** build `stable latest` where available for Fedora ([60444a8](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/60444a8abf254bc3a01ee3a9945d7872efb72f11))
* **gitlab-ci:** build openSUSE `3002.2` using `stable latest` ([9b6b6f8](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/9b6b6f86aff593082b319bf5127803236897adeb))
* **gitlab-ci:** display the `--versions-report` before the tests run ([6b82e74](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/6b82e7422578ebf57df70788b420b31d54764202))
* **gitlab-ci:** install `gzip` in Tumbleweed to avoid `busybox-gzip` ([1062315](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/10623151883f51c34d3d25b913dea4f453ceb4cc)), closes [/github.com/saltstack-formulas/libvirt-formula/pull/83#issuecomment-767748061](https://gitlab.com//github.com/saltstack-formulas/libvirt-formula/pull/83/issues/issuecomment-767748061)
* **gitlab-ci:** run `black --diff` before `black --check` ([7f69af5](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/7f69af5faf9299ca77b171faba1d39000efbd1d5))

### Features

* **dockerfile.zyp:** use downstream repo for openSUSE (`-w` flag) ([3796d7c](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/3796d7cb8a23d411c0bc83e22101a3cd53b5ba56))
* **salt_version:** use `SVB` to deal with version number for bootstrap ([566c86b](https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/commit/566c86b1d87fabf80677ea6a9067c7ab977b7cb4))
@baby-gnu
Copy link
Contributor Author

Hello @myii

@baby-gnu I forgot to mention, I've got a fix for the system.rb library as well.

Where can I found that fix?

@myii
Copy link
Contributor

myii commented Jan 29, 2021

@baby-gnu This can be fixed and merged after #85 is merged, including enabling default-opensuse-tmbl-latest-master-py3 in both CI files (GitLab and Travis).

@baby-gnu baby-gnu force-pushed the feature/support-opensuse-tumbleweed branch from 490593e to b6cc44c Compare January 30, 2021 23:28
@baby-gnu
Copy link
Contributor Author

I checked the Tumbleweed kitchen platforms on my test bed and they all work with my latest push:

~/libvirt-formula/$ ./bin/kitchen list tmbl
Instance                                 Driver  Provisioner  Verifier  Transport  Last Action  Last Error
default-opensuse-tmbl-latest-master-py3  Docker  SaltSolo     Inspec    Ssh        Verified     <None>
default-opensuse-tmbl-latest-3002-2-py3  Docker  SaltSolo     Inspec    Ssh        Verified     <None>
default-opensuse-tmbl-latest-3001-4-py3  Docker  SaltSolo     Inspec    Ssh        Verified     <None>

@myii myii merged commit 62f7348 into saltstack-formulas:master Jan 31, 2021
@myii
Copy link
Contributor

myii commented Jan 31, 2021

@baby-gnu Fantastic, we got there in the end! Thanks for the review, @aboe76.

@saltstack-formulas-travis

🎉 This PR is included in version 3.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants