Bug 1900737 - puppet run fails with error parameter 'port' expects a Stdlib::Port = Integer[0, 65535] value, got String
Summary: puppet run fails with error parameter 'port' expects a Stdlib::Port = Integer...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: 6.9.0
Assignee: Ondřej Pražák
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-23 15:40 UTC by dgupte
Modified: 2024-03-25 17:12 UTC (History)
10 users (show)

Fixed In Version: tfm-rubygem-foreman_openscap-4.1.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1919420 (view as bug list)
Environment:
Last Closed: 2021-04-21 13:18:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31423 0 Normal Closed puppet run fails with error parameter 'port' expects a Stdlib::Port = Integer[0, 65535] value, got String 2021-02-08 06:49:27 UTC
Red Hat Knowledge Base (Solution) 5804201 0 None None None 2021-02-24 12:46:34 UTC
Red Hat Knowledge Base (Solution) 5836281 0 None None None 2021-02-25 15:33:04 UTC

Description dgupte 2020-11-23 15:40:28 UTC
Description of problem:
>>>
After updating Satellite from 6.7  to 6.8, hosts can no longer generate Puppet Reports / Scap Reports.
If we manually trigger a puppet run (puppet agent -t) on the client, you will see the following error:
# puppet agent -t
       Info: Using configured environment 'shks_default'
       Info: Retrieving pluginfacts
       Info: Retrieving plugin
       Info: Retrieving locales
       Info: Loading facts
      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation 
      Error: Error while evaluating a Resource Statement, Class[Foreman_scap_client]: parameter 'port' 
      expects a Stdlib::Port = Integer[0, 65535] value, got String on node client.example.com
     Warning: Not using cache on failed catalog
     Error: Could not retrieve catalog; skipping run

Version-Release number of selected component (if applicable):
>>>
puppet-foreman_scap_client-0.4.0-1.el7sat.noarch


Actual results:
scap report generation fails with type errors. 

Expected results:
Should puppet run successfully.

Additional info:
>>>
Workaround is to  change the port definition on the Satellite from "String" to "Integer" from Satellite webui => Configure => Smart Class Parameter => Port

Satellite 6.8  - puppet-foreman_scap_client-0.4.0-1.el7sat.noarch
-------------
# cat /usr/share/puppet/modules/foreman_scap_client/manifests/init.pp | grep -i port

  Stdlib::Port $port,
  Optional[Stdlib::Port] $http_proxy_port = undef,

Package:-  puppetlabs-stdlib-4.25.1-2.el7sat.noarch

# cat /usr/share/puppet/modules/stdlib/types/port.pp | grep -i port
type Stdlib::Port = Integer[0, 65535]


Satellite 6.7 -  puppet-foreman_scap_client-0.3.21-1.el7sat.noarch
-------------
# cat /usr/share/puppet/modules/foreman_scap_client/manifests/init.pp | grep -i port
  $port,
  $http_proxy_port        = undef,

Comment 1 Ondřej Pražák 2020-12-01 14:44:28 UTC
Created redmine issue https://projects.theforeman.org/issues/31423 from this bug

Comment 2 Bryan Kearney 2020-12-01 16:04:19 UTC
Upstream bug assigned to oprazak

Comment 3 Bryan Kearney 2020-12-01 16:04:22 UTC
Upstream bug assigned to oprazak

Comment 4 Bryan Kearney 2020-12-02 20:04:07 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31423 has been resolved.

Comment 5 Jameer Pathan 2020-12-29 09:01:00 UTC
Verified

Verified with:
- Satellite 6.9.0 snap 7
- tfm-rubygem-foreman_openscap-4.1.1-1.el7sat.noarch

Test steps:
1. Install Satellite 6.8.2 GA
2. Configure scap on content host with puppet deployment option.
3. Generate few Arf reports.
4. Upgrade Satellite 6.8.2 GA to Satellite 6.9.0 snap 7
5. Manually trigger a puppet run (puppet agent -t) on the client.
6. Generate few Arf reports.

Observation:
- Puppet run was successful, no error observed.
- Successfully generated Scap Arf reports.
- Parameter type of "port" (smart class parameter) is integer.

Comment 13 errata-xmlrpc 2021-04-21 13:18:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313


Note You need to log in before you can comment on or make changes to this bug.