For Puppet 8, strict mode is on by default, meaning strict defaults to
error and `strict_variables` defaults to true. With strict set to error,
extra validation & checks are performed and fail as an error. This
change could be a breaking change if your code does not conform to
strict mode.
Examples of code that does not conform to strict mode:
- Accessing a variable without first defining it: `notice(\$myvar)`
- Accessing a legacy fact: `notice($facts['osfamily'])`
- Coercing a string into a numeric: `"1" + 1`
To return to the previous behavior, set, strict to warning and
`strict_variables` to false. PUP-11725
## Evaluation
Using a pcc node configured with puppet 8 should suss out the majority
of these issues. The current count of affected nodes types is 19.
Evaluated by running a catalog compile test on a PCC puppet 8 node.
- [x] `modules/profile/manifests/wmcs/services/maintain_dbusers.pp:82`
- `Unknown variable: ::passwords::labsdbaccounts::db_user`
- Hosts: cloudcontrol1005.eqiad.wmnet
- [x] `modules/dumps/manifests/web/fetches/kiwix.pp:27`
- `The string '1001' was automatically coerced to the numerical value 1001`
- Hosts: clouddumps1001.wikimedia.org
- [x] `modules/scap/templates/mw-deployment-vars.erb:4`
- `Undefined variable 'scap::master::common_path'`
- Hosts: cloudweb1003.wikimedia.org, mwdebug1001.eqiad.wmnet
- [x] `modules/mtail/manifests/program.pp:43`
- `Unknown variable: 'notify'`
- Hosts: contint1002.wikimedia.org
- [ ] `modules/profile/manifests/cache/kafka/webrequest.pp:113`
- `Unknown variable: 'profile::cache::kafka::certificate::ssl_keystore_location'`
- Hosts: cp1100.eqiad.wmnet
- [x] `modules/profile/manifests/mariadb/grants/production.pp:52:32`
- `Unknown variable: 'passwords::mysql::phabricator::phd_pass'`
- Hosts: db1125.eqiad.wmnet, es1020.eqiad.wmnet,
pc1011.eqiad.wmnet, phab1004.eqiad.wmnet
- [ ] `modules/profile/manifests/cassandra.pp:7:49`
- `Undefined variable 'passwords::cassandra::super_password`
- Hosts: ml-cache1001.eqiad.wmnet
- [ ]
`modules/prometheus/manifests/blackbox/modules/service_catalog.pp:55:15`
- `Unknown variable: 'service_modules'`
- Hosts: prometheus1005.eqiad.wmnet
- [x] `modules/puppetmaster/manifests/geoip.pp:59:31`
- `Unknown variable: 'passwords::geoip::user_id_ipinfo'`
- Hosts: puppetmaster1001.eqiad.wmnet
- [ ] `modules/profile/manifests/puppetserver/git.pp:186:55`
- `Unknown variable: 'puppetserver::g10k::config_file'`
- Hosts: puppetserver1001.eqiad.wmnet
- [ ] Enable strict mode in puppet 7