hey there I recently update puppetserver to 6.12.1 ( along with
puppetdb to 6.11.2 and puppet-agent to 6.17.0 ) and occasionally on
some puppet runs ( I cannot determine why it happens sometimes and not
others ) we see the following reported...

Error while evaluating a Virtual Query, undefined method `platform'
for nil:NilClass (file:
/etc/puppetlabs/code/environments/production/manifests/site.pp, line:
14, column: 3)

...this is the very first manifest that gets parsed and here is the
code itself ( I have compressed it but will refer to the line in
question )...

# site.pp
# global resource defaults
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin' }
File { backup => 'main' }
User { managehome => true }
# global resource ordering - rhsm before yumrepos
$rhsmtrue = hiera('flex::general::redhat::manage_rhsm',false)
if("${rhsmtrue}" and $::operatingsystem == 'RedHat'){
  Rhsm_register <| |> -> Yumrepo <| |> -> Package <| provider != 'rpm'
|>  <-- THIS IS THE LINE IN QUESTION
}
else{
  Yumrepo <| |> -> Package <| provider != 'rpm' |>
}
# use flex roles and profiles for all nodes
node default {
  include ::flex
}

Can anyone please help explain what may be happening here ? I can
confirm that we do not see this error in our logs prior to the
upgrade.

As it is calling the "rhsm_register" type could it be the
subscription_manager module we are running is no longer supported by
the version of puppet ?

But surely you would not break code within a major 6.x release ?

Thanks for any help you can provide !!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAOp5WB4FL-S41%2B6-BOSiD_zH6ju3OhxcxDF7-oaNpwJW0XhWmA%40mail.gmail.com.

Reply via email to