Bug #29763
closedUpgrade theforeman 1.24 to 2.0 --only=postgresql failed!
Description
Hi Team,
I'm running theforman 1.2.4 and trying to upgrade to 2.0 but failed as below:
# foreman-installer
[ INFO 2020-05-13T15:23:44 verbose] Executing hooks in group pre_migrations
[ INFO 2020-05-13T15:23:44 verbose] All hooks in group pre_migrations finished
[ INFO 2020-05-13T15:23:44 verbose] Executing hooks in group boot
[ INFO 2020-05-13T15:23:44 verbose] All hooks in group boot finished
[ INFO 2020-05-13T15:23:44 verbose] Executing hooks in group init
[ INFO 2020-05-13T15:23:44 verbose] All hooks in group init finished
[ INFO 2020-05-13T15:23:44 verbose] Loading default values from puppet modules...
[ INFO 2020-05-13T15:23:44 verbose] ... finished
[ INFO 2020-05-13T15:23:44 verbose] Executing hooks in group pre_values
[ INFO 2020-05-13T15:23:44 verbose] All hooks in group pre_values finished
[ INFO 2020-05-13T15:23:44 verbose] Running installer with args "--noop", "--dont-save-answers", "--verbose"
[ INFO 2020-05-13T15:23:44 verbose] Executing hooks in group pre_validations
[ INFO 2020-05-13T15:23:45 verbose] All hooks in group pre_validations finished
[ INFO 2020-05-13T15:23:45 verbose] Running validation checks
[ INFO 2020-05-13T15:23:45 verbose] Executing hooks in group pre_commit
[ INFO 2020-05-13T15:23:45 verbose] All hooks in group pre_commit finished
[ INFO 2020-05-13T15:23:45 verbose] Executing hooks in group pre
/usr/share/ruby/psych.rb:248:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 2 column 1 (Psych::SyntaxError)
from /usr/share/ruby/psych.rb:248:in `parse_stream'
from /usr/share/ruby/psych.rb:196:in `parse'
from /usr/share/ruby/psych.rb:123:in `load'
from /usr/share/gems/gems/foreman_maintain-0.6.2/definitions/features/hammer.rb:145:in `load_from_file'
from /usr/share/gems/gems/foreman_maintain-0.6.2/definitions/features/hammer.rb:134:in `block in load_configuration'
from /usr/share/gems/gems/foreman_maintain-0.6.2/definitions/features/hammer.rb:131:in `each'
from /usr/share/gems/gems/foreman_maintain-0.6.2/definitions/features/hammer.rb:131:in `load_configuration'
from /usr/share/gems/gems/foreman_maintain-0.6.2/definitions/features/hammer.rb:18:in `initialize'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/detector.rb:114:in `new'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/detector.rb:114:in `detect_feature'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/detector.rb:73:in `block in ensure_features_detected'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/detector.rb:72:in `each_key'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/detector.rb:72:in `ensure_features_detected'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/detector.rb:45:in `available_procedures'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain.rb:117:in `allowed_available_procedures'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced/procedure/run_command.rb:7:in `<class:RunCommand>'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced/procedure/run_command.rb:6:in `<module:Procedure>'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced/procedure/run_command.rb:5:in `<module:Cli>'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced/procedure/run_command.rb:4:in `<module:ForemanMaintain>'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced/procedure/run_command.rb:3:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced/procedure_command.rb:1:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli/advanced_command.rb:1:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/foreman_maintain-0.6.2/lib/foreman_maintain/cli.rb:8:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/foreman_maintain-0.6.2/bin/foreman-maintain:14:in `<top (required)>'
from /bin/foreman-maintain:23:in `load'
from /bin/foreman-maintain:23:in `<main>'
foreman-maintain service start --only=postgresql failed! Check the output for error!
Current PostgreSQL version :
[root]# rpm -qa | grep postgresql
foreman-postgresql-2.0.0-2.el7.noarch
postgresql-9.2.24-2.el7_7.x86_64
postgresql-server-9.2.24-2.el7_7.x86_64
postgresql-libs-9.2.24-2.el7_7.x86_64
Updated by Som Dara over 4 years ago
- Subject changed from Upgrade theforeman 1.2.4 to 2.0 --only=postgresql failed! to Upgrade theforeman 1.24 to 2.0 --only=postgresql failed!
- Fixed in Releases 1.24.3 added
- Fixed in Releases deleted (
2.0.1)
Updated by Tomer Brisker over 4 years ago
- Project changed from Foreman to Foreman Maintain
- Category deleted (
External Nodes) - Fixed in Releases deleted (
1.24.3) - Found in Releases deleted (
2.0.0)
Looks like an issue with foreman-maintain, moving to the correct project.
Updated by Kavita Gaikwad over 4 years ago
Hello Som,
could you verify and confirm spacing in file cli_config.yml under hammer configurations?
Sometimes, extra spaces or not enough spaces before a key value in YAML file can cause this problem.
Thanks!
Updated by Som Dara over 4 years ago
Hi Kavita,
Here's the cli_config.yml.
# User interface related settings
:ui:
# Enable interactive queries?
:interactive: true
# Number of records listed per page
# :per_page: 20
# Location of shell history file
:history_file: '~/.hammer/history'
# Mark translated strings with X characters (for developers)
#:mark_translated: false
# Hide headers from output of list actions
# :no_headers: true
# Enable/disable color output of logger in Clamp commands
:watch_plain: false
# Forece relaod of Apipie cache with every Hammer invocation
:reload_cache: false
# Directory where the logs are stored. The default is /var/log/hammer/ and the log file is named hammer.log
:log_dir: '~/.hammer/log'
# Logging level. One of debug, info, warning, error, fatal
:log_level: 'error'
#:log_owner: 'foreman'
#:log_group: 'foreman'
# Maximum log size in bytes. Log rotates when the value gets exceeded
#:log_size: 5 #in MB
# Log record pattern (logging gem syntax)
#:log_pattern: '[%5l %d %c] %m'
# SSL auth options
#:ssl:
# Path to a CA file in PEM format, mutually exclusive with :ssl_ca_path:
:ssl_ca_file: '/etc/ssl/certs/digicert/DigiCertCA.crt'
# Path to a direcotry with CA files, mutually exclusive with :ssl_ca_file:
# The directory should contain one certificate per file in PEM format, with a file name of the form hash.N
# The hash can be obtained via the -hash option of the openssl x509 command. See the OpenSSL documentation
# for more information.
#:ssl_ca_path: '/path/to/ca'
# Turn SSL verification on/off
:verify_ssl: false
# Path to a client certificate, DER- or PEM-encoded certificates are supported
:ssl_client_cert: '/etc/ssl/certs/digicert/DigiCertCA.crt'
# Path to a client key
#:ssl_client_key: '/path/to/cert.key'
# Enable standard authentication in addition to client certificate authentication.
# Switch to false if you want to rely on certificates only.
#:ssl_with_basic_auth: true
# Local CA cert store path where hammer stores certificates fetched from the server.
# Certs from the local storage are used only when neither :ssl_ca_file: nor :ssl_ca_path: is cofigured.
#:local_ca_store_path: '~/.hammer/certs'