Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

temporarily find an alternate pkg to install on CentOS AH #254

Closed
miabbott opened this issue Sep 25, 2017 · 1 comment
Closed

temporarily find an alternate pkg to install on CentOS AH #254

miabbott opened this issue Sep 25, 2017 · 1 comment
Labels

Comments

@miabbott
Copy link
Collaborator

We're seeing failures when running the improved-sanity-test on CentOS AH when the test tries to do an rpm-ostree install httpd

The latest version of CentOS AH had the centos-logos package dropped out of its content set, but httpd requires it to be installed. See CentOS/sig-atomic-buildscripts#297 (comment) for a description of what happened with that package.

We should temporarily find another suitable package to install, until coreos/rpm-ostree#853 makes it into CentOS AH.

@miabbott miabbott added the bug label Sep 25, 2017
@miabbott
Copy link
Collaborator Author

TASK [rpm_ostree_install : Install httpd and no reboot] ************************
FAILED - RETRYING: Install httpd and no reboot (5 retries left).
FAILED - RETRYING: Install httpd and no reboot (4 retries left).
FAILED - RETRYING: Install httpd and no reboot (3 retries left).
FAILED - RETRYING: Install httpd and no reboot (2 retries left).
FAILED - RETRYING: Install httpd and no reboot (1 retries left).
fatal: [testnode]: FAILED! => {
    "attempts": 5, 
    "changed": true, 
    "cmd": [
        "rpm-ostree", 
        "install", 
        "httpd"
    ], 
    "delta": "0:00:01.316143", 
    "end": "2017-09-25 13:47:46.353841", 
    "failed": true, 
    "rc": 1, 
    "start": "2017-09-25 13:47:45.037698"
}

STDOUT:
---
Checking out tree c81fd5c... done
Enabled rpm-md repositories: base updates extras epel
rpm-md repo 'base' (cached); generated: 2017-09-05 21:51:13
rpm-md repo 'updates' (cached); generated: 2017-09-21 16:55:41
rpm-md repo 'extras' (cached); generated: 2017-09-21 23:03:10
rpm-md repo 'epel' (cached); generated: 2017-09-25 07:13:53
Importing metadata 1%
Importing metadata 25%
Importing metadata 26%
Importing metadata 50%
Importing metadata 51%
Importing metadata 75%
Importing metadata 76%
Importing metadata 100%
Resolving dependencies... done
---

STDERR:
---
error: Unpacking centos-logos-70.0.6-3.el7.centos.noarch: Unsupported path: /boot/grub/splash.xpm.gz; See https://github.com/projectatomic/rpm-ostree/issues/233

miabbott added a commit to miabbott/atomic-host-tests that referenced this issue Oct 2, 2017
In projectatomic#254, it is noted that the package layering of `httpd` isn't
working on CentOS because the `centos-logos` dependency is trying to
layer files on `/boot`.  Until CentOS gets a version of `rpm-ostree`
that supports layering on `/boot` (see coreos/rpm-ostree#969),
we need to use a different package to test package layering in CentOS.

This change brings in a conditional installation of `ntp` in the
CentOS case, until we have a newer version of `rpm-ostree` to use.
miabbott added a commit to miabbott/atomic-host-tests that referenced this issue Oct 5, 2017
In projectatomic#254, it is noted that the package layering of `httpd` isn't
working on CentOS because the `centos-logos` dependency is trying to
layer files on `/boot`.  Until CentOS gets a version of `rpm-ostree`
that supports layering on `/boot` (see coreos/rpm-ostree#969),
we need to use a different package to test package layering in CentOS.

This change brings in a conditional installation of `ntp` in the
CentOS case, until we have a newer version of `rpm-ostree` to use.
mike-nguyen pushed a commit that referenced this issue Oct 6, 2017
* roles: improve ability to check for un/installed packages

The `rpm_ostree_install*` and `rpm_ostree_uninstall*` roles had some
limitations when first created.  Namely, only being able to be used
once per playbook and being unable to check for a binary that did not
match the package name.

This changes the roles to use the `allow_duplicates` boolean, so that
they may be used multiple times in the same playbook.  The `*verify`
roles have also been changed to allow for checking for a different
binary name than what is used by the package.  For example, the `ntp`
package installs an `ntpd` binary, whereas the `httpd` package installs
an `httpd` binary.

* tests: handle package layering on CentOS

In #254, it is noted that the package layering of `httpd` isn't
working on CentOS because the `centos-logos` dependency is trying to
layer files on `/boot`.  Until CentOS gets a version of `rpm-ostree`
that supports layering on `/boot` (see coreos/rpm-ostree#969),
we need to use a different package to test package layering in CentOS.

This change brings in a conditional installation of `ntp` in the
CentOS case, until we have a newer version of `rpm-ostree` to use.

* test/i-s-t: use conditionl vars from vars files

This changes how the variables used by the `improved-sanity-test` are
loaded in each playbook section.  Commonly used variables are now
found in `vars/common.yml` and are loaded for each playbook section.
Additional variables that may change per OS platform, are broken out
into separate files.

By supplying a list of files to the `vars_files:` statement, Ansible
will try to import each file in the list and stopping when a file is
found.[0]  This allows us to override any variables per OS while
maintaing sensible defaults.

[0] http://docs.ansible.com/ansible/latest/playbooks_conditionals.html#conditional-imports

* roles/tests: handle shared variable namespace

When running a role multiple times in a playbook, we can run into
problems with variables since they all live in the same namespace.
Notably, when you run a role multiple times, variables that are
optional but have been defined, will carry over to the next execution
of the role.  Or if two roles have the same variable name, you can get
values stomping on each other.

This commit tries to alleviate some of these problems by updating the
variable names in the roles to be unique to the role.  Additionally,
when using roles multiple times in playbooks, both required and optional
variables are explicitly defined to avoid any overwriting.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant