Skip to content
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

Pre-install foreman-selinux in acceptance environment #1041

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wbclark
Copy link
Contributor

@wbclark wbclark commented Apr 20, 2022

Also do not purge foreman-selinux between tests. This is a workaround
for the Puppet issue [PUP-10548].

require => Class['foreman::repo'],
}

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}

require => Class['foreman::repo'],
}

if $foreman::repo::configure_scl_repo {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if $foreman::repo::configure_scl_repo {
if $foreman::repo::configure_scl_repo {

ensure => installed,
require => Class['foreman::repo'],
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This whole block is indented too far I think. And you'll have a trailing } on line 18.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was my intention to have the rh-redis5-redis package inside if $facts['os']['selinux']['enabled'] { ... } because of the existing comment on L#5: # Needed for idempotency when SELinux is enabled (which now conveniently applies to both package resources)

IMO it was an oversight that this wasn't already conditioned on selinux being enabled.

I thought about making the change in a separate commit but it seemed too minor to warrant it. That would have made this easier to review but probably the git log clutter is not worth it when this only affects tests.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

That works. Can you rebase on latest master branch to ensure tests pass?

@wbclark
Copy link
Contributor Author

wbclark commented Apr 22, 2022

Hey @ehelms , I triggered the tests to run again. The failures on Ubuntu look non-related:

  Warning: PostgresqlValidator.attempt_connection: Sleeping for 1 seconds
  Warning: PostgresqlValidator.attempt_connection: Sleeping for 1 seconds
  Warning: PostgresqlValidator.attempt_connection: Sleeping for 1 seconds
  Error: Unable to connect to PostgreSQL server! (:5432)
  Error: /Stage[main]/Postgresql::Server::Service/Postgresql_conn_validator[validate_service_is_running]/ensure: change from 'absent' to 'present' failed: Unable to connect to PostgreSQL server! (:5432)

@evgeni
Copy link
Member

evgeni commented Apr 25, 2022

Yeah, ubuntu 20.04 tests are busted.

Also do not purge foreman-selinux between tests. This is a workaround
for the Puppet issue [PUP-10548].
@ehelms ehelms force-pushed the selinux_indempotence branch from c7fbee0 to f340ecf Compare April 25, 2022 12:05
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Needs a rebase now.

@@ -1,7 +1,7 @@
def purge_foreman
case fact('osfamily')
when 'RedHat'
on default, 'yum -y remove foreman* tfm-*'
Copy link
Member

Choose a reason for hiding this comment

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

Isn't there a way to exclude a package in yum/dnf remove?

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

Successfully merging this pull request may close these issues.

5 participants