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

Fixes #29213 - Support el8 #582

Merged
merged 1 commit into from
May 12, 2020
Merged

Fixes #29213 - Support el8 #582

merged 1 commit into from
May 12, 2020

Conversation

wbclark
Copy link
Contributor

@wbclark wbclark commented Apr 15, 2020

No description provided.

@wbclark wbclark force-pushed the el8 branch 4 times, most recently from cb8f459 to d4d8b57 Compare April 16, 2020 05:35
@ehelms
Copy link
Member

ehelms commented Apr 20, 2020

For the installer itself running against a system, the only error I hit with default config is in this module:

  [ERROR 2020-04-20T19:43:51 verbose]  /Stage[main]/Foreman_proxy::Tftp::Netboot/File[/var/lib/tftpboot/grub2/shim.efi]: Could not evaluate: Could not retrieve information from environment production source(s) file:///boot/efi/EFI/centos/shim.efi
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:157:in `fail'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/source.rb:190:in `metadata'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/source.rb:126:in `copy_source_values'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:816:in `retrieve'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1133:in `retrieve_resource'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:307:in `from_resource'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:267:in `apply'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:287:in `eval_resource'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `call'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `block (2 levels) in evaluate'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:521:in `block in thinmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:520:in `thinmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `block in evaluate'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:122:in `traverse'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:178:in `evaluate'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:240:in `block (2 levels) in apply'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:521:in `block in thinmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:520:in `thinmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block in apply'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:161:in `with_destination'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `apply'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `block (2 levels) in apply_catalog'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:521:in `block in thinmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:520:in `thinmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in `block in apply_catalog'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:233:in `block in benchmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `benchmark'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:183:in `apply_catalog'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:387:in `run_internal'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:227:in `block in run'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:210:in `run'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:343:in `apply_catalog'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:260:in `block (2 levels) in main'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:243:in `block in main'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:207:in `main'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:177:in `run_command'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `block in run'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:710:in `exit_on_fail'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `run'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
    [ERROR 2020-04-20T19:43:51 verbose] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

@ehelms
Copy link
Member

ehelms commented Apr 21, 2020

I opened #583 to tackle specific runtime issue I see for El8 support.

@wbclark wbclark force-pushed the el8 branch 3 times, most recently from e57bd2a to d88cd3e Compare April 23, 2020 17:28
@wbclark
Copy link
Contributor Author

wbclark commented Apr 23, 2020

@ehelms latest changes I've pushed here should fix the el8 spec tests. Investigating failures on centos{7,8} acceptance tests next.

@wbclark
Copy link
Contributor Author

wbclark commented Apr 27, 2020

@ehelms @ekohl could you point to the repository that is no longer enabled by the module, so that I can re-enable it for the acceptance tests here?

@ekohl
Copy link
Member

ekohl commented Apr 27, 2020

theforeman/puppet-foreman#830 would fix that. Haven't had time to dive into the test failures.

@ekohl
Copy link
Member

ekohl commented Apr 28, 2020

spec/classes/foreman_proxy__tftp__netboot_spec.rb Outdated Show resolved Hide resolved
when 'CentOS'
it { should contain_file("/tftproot/grub2/grubx64.efi").with_source('/boot/efi/EFI/centos/grubx64.efi') }
it { should contain_file("/tftproot/grub2/shimx64.efi").with_source('/boot/efi/EFI/centos/shimx64.efi').with_owner('root').with_mode('0644') }
end
else
it { is_expected.to contain_class('foreman_proxy::tftp::netboot').with_grub_installation_type('redhat_old') }
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this is a good time to drop the EL6 code since this module doesn't support EL6. We also don't support running on EL 7.4 so all of that can be cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will have to research this further. I assume it involves changes to multiple manifests and tests.

Copy link
Member

Choose a reason for hiding this comment

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

@wbclark
Copy link
Contributor Author

wbclark commented Apr 30, 2020

Currently it's failing for me due to:

An error occurred in a `before(:suite)` hook.
Failure/Error: apply_manifest_on(host, File.read(local_setup), catch_failures: true)
Beaker::Host::CommandFailure:
  Host 'centos7-64-1' exited with 1 running:
   puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.GLFwG8
  Last 10 lines of output were:
  	Error: Evaluation Error: Error while evaluating a Resource Statement, Could not find declared class foreman::repo (file: /tmp/apply_manifest.pp.GLFwG8, line: 1, column: 1) on node centos7-64-1

I believe we are using a module in spec/setup_acceptance_node.pp that wasn't yet defined as a dependency.

@ekohl
Copy link
Member

ekohl commented Apr 30, 2020

Did you run spec_prep?

@wbclark
Copy link
Contributor Author

wbclark commented Apr 30, 2020

spec_prep resolved that, now I'm getting:

centos7-64-1 17:32:44$ puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.WTdHKE
  Info: Loading facts
  Info: Loading facts
  Info: Loading facts
  Info: Loading facts
  Info: Loading facts
  Info: Loading facts
  Info: Loading facts
  Info: Loading facts
  Error: Evaluation Error: Error while evaluating a Function Call, 'upcase' parameter 'arg' expects a value of type Numeric, String, Array, or Hash, got Undef (file: /etc/puppetlabs/code/environments/production/modules/foreman_proxy/manifests/params.pp, line: 279, column: 29) on node centos7-64-1

centos7-64-1 executed in 3.10 seconds
Exited: 1
  applies with no errors (FAILED - 1)

I will check why that's happening.

@wbclark
Copy link
Contributor Author

wbclark commented May 1, 2020

So, tests passed on Travis but the centos7 test is still failing for me locally due to the domain fact not being defined:

[vagrant@centos7-64-1 ~]$ facter networking | egrep 'fqdn|hostname|domain'
  fqdn => "centos7-64-1",
  hostname => "centos7-64-1",
[vagrant@centos7-64-1 ~]$ 

I think we could fix that just by making $dns_zone default to example.com when $facts['networking']['domain'] is undefined.

@wbclark
Copy link
Contributor Author

wbclark commented May 1, 2020

Confirmed spec/acceptance/basic_spec.rb is also failing on local el8 for the same reason.

@ekohl
Copy link
Member

ekohl commented May 1, 2020

IMHO it's still better to start at the lower tiers, then work your way up. https://github.com/theforeman/foreman-installer-modulesync#finding-the-order

You're now testing a module that depends on modules that themselves don't declare themselves compatible with EL8 and that can make you run into issues.

@ehelms
Copy link
Member

ehelms commented May 8, 2020

Looks like this just needs two tests updated due to differences between EL7 and EL8

@wbclark
Copy link
Contributor Author

wbclark commented May 8, 2020

Looks like this just needs two tests updated due to differences between EL7 and EL8

Yeah, I lost the fix there when rebasing. It's my next priority when I'm off this call :)

@wbclark wbclark force-pushed the el8 branch 2 times, most recently from 93ab5a2 to 6faefc0 Compare May 8, 2020 14:18
@ehelms
Copy link
Member

ehelms commented May 8, 2020

Failures look related to a new release of beaker today: https://rubygems.org/gems/beaker/versions/4.22.0

@wbclark wbclark changed the title [WIP] support el8 support el8 May 8, 2020
@wbclark
Copy link
Contributor Author

wbclark commented May 8, 2020

pinning beaker <= 4.22.0 appears to have resolved it. Updated PR title since this is no longer WIP, will update commit messages and push once more, then this should be good to go I think.

@wbclark wbclark changed the title support el8 Fixes #29213 - Support el8 May 8, 2020
Copy link
Member

@ehelms ehelms left a comment

Choose a reason for hiding this comment

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

I;m happy with this approach to get the EL8 support in and then use that Redmine issue to fix the problem with beaker version across our modules via modulesync.

@@ -41,13 +41,21 @@
case facts[:operatingsystem]
when /^(RedHat|Scientific|OracleLinux)$/
it { should contain_file("/tftproot/grub2/grubx64.efi").with_source('/boot/efi/EFI/redhat/grubx64.efi') }
it { should contain_file("/tftproot/grub2/shim.efi").with_source('/boot/efi/EFI/redhat/shim.efi').with_owner('root').with_mode('0644') }
if facts[:os]['release']['major'].to_i >= 8
it { should contain_file("/tftproot/grub2/shimx64.efi").with_source('/boot/efi/EFI/redhat/shimx64.efi').with_owner('root').with_mode('0644') }
Copy link
Contributor

Choose a reason for hiding this comment

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

is this related to GH-592?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, good catch. The other PR is to essentially drop shim.efi and use only shimx64.efi (both are available on EL7). If that is merged, it would simplify the tests here because there would no longer be a difference between EL7 and EL8.

I think we could go ahead and merge this, since the other one is waiting on contrib with a few requested changes, and the other one would then also need to recombine the EL{7,8} tests to simply test for shimx64.efi in all cases. What do you think @mmoll ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to have other PR in first, tbh...

Gemfile Outdated Show resolved Hide resolved
@ekohl
Copy link
Member

ekohl commented May 11, 2020

Please rebase

@ehelms
Copy link
Member

ehelms commented May 12, 2020

Thanks @wbclark !

@ehelms ehelms merged commit dc6569a into theforeman:master May 12, 2020
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