Andy Hall
unread,Jul 16, 2020, 3:14:34 AM7/16/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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 !!