hi all, I can use foremain-maintain but when I run the command I get the error E: Package rubygem-foreman_maintain cannot be found., is that normal:
root@testdev:~# foreman-maintain upgrade check
Checking for new version of rubygem-foreman_maintain...
E: Package rubygem-foreman_maintain cannot be found.
Nothing to update, can't find new version of rubygem-foreman_maintain.
--target-version not specified
Possible target versions are:
nightly
root@testdev::~# dpkg-query -l | grep foreman-maintain
ii ruby-foreman-maintain 1.2.4-1+ubuntu2004 all Foreman maintenance tool belt
I install foreman-maintain: root@testdev:~# apt install ruby-foreman-maintain
Foreman and Proxy versions: foreman 3.5.1 , foreman-proxy 3.5.1
Why when I want to create backup I get below error:
root@testdev:~# foreman-maintain backup offline /tmp/backup
Starting backup: 2023-03-14 11:22:46 +0100
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up:
/ Checking connection to the Foreman DB [OK]
--------------------------------------------------------------------------------
Running Backup
================================================================================
Confirm turning off services is allowed:
WARNING: This script will stop your services.
Do you want to proceed?, [y(yes), q(quit)] y
[OK]
--------------------------------------------------------------------------------
Prepare backup Directory:
Creating backup folder /tmp/backup/foreman-backup-2023-03-14-11-22-46 [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable: [OK]
--------------------------------------------------------------------------------
Generate metadata:
| Saving metadata to metadata.yml [OK]
--------------------------------------------------------------------------------
Detect features available in the local proxy: [OK]
--------------------------------------------------------------------------------
Add maintenance_mode tables/chain to nftables/iptables: [OK]
--------------------------------------------------------------------------------
Stop applicable services:
Stopping the following service(s): [FAIL]
No services found matching your parameters
--------------------------------------------------------------------------------
Scenario [Backup] failed.
The following steps ended up in failing state:
[service-stop]
Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="service-stop"
Running Failed backup cleanup
================================================================================
Start applicable services:
Starting the following service(s): [FAIL]
No services found matching your parameters
--------------------------------------------------------------------------------
Remove maintenance mode table/chain from nftables/iptables: [OK]
--------------------------------------------------------------------------------
Clean up backup directory: [OK]
--------------------------------------------------------------------------------
Scenario [Failed backup cleanup] failed.
The following steps ended up in failing state:
[service-start]
Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="service-start"
Done with backup: 2023-03-14 11:23:01 +0100
Backup didn't finish. Incomplete backup was removed.
Patches to foreman_maintain for real support. Perhaps in the mean time we should disable the feature on Debian so it doesn’t show up? Or at least show a proper message.
No I do not. Creating a backup is part of our release pipeline, and that passed fine. So it’s nothing that we’d be aware of.
Would you mind sharing the contents of /var/log/foreman-maintain/foreman-maintain.log with us? feel free to do it via mail to evgeni at redhat dot com if you don’t want to upload it somewhere public.
A new version will be in the repos (but I don’t think there are any changes between the 1.2.4 you have ans the latest 1.2.7 release that would help you right now).
Looking at your log, my hunch is that it’s because of your german locale and something gets messed up.
Still need to confirm that here, but could you try with LC_ALL=en_US.utf8 LANG=en_US.utf8 LANGUAGE=en_US.utf8 or something similar?
Does anyone know why I get below error, satellite, satellite-capsule and satellite-installer are not installed, do I have to install them manually? I installed foreman on available Puppetserver
# foreman-maintain service status
Running Status Services
================================================================================
Get status of applicable services:
Displaying the following service(s): [FAIL]
No services found matching your parameters
--------------------------------------------------------------------------------
Scenario [Status Services] failed.
The following steps ended up in failing state:
[service-status]
Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="service-status"
The error in foreman-maintain.log:
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : Running command dpkg-query --show puppetserver with stdin nil
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : output of the command:
puppetserver 7.9.0-1focal
E, [2023-03-15 09:23:43+0100 #78090] ERROR -- : No services found matching your parameters (RuntimeError)
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/definitions/features/service.rb:32:in `filtered_services'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/definitions/procedures/service/base.rb:19:in `run_service_action'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/definitions/procedures/service/status.rb:14:in `run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/executable.rb:139:in `__run__'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner/execution.rb:82:in `block in run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner/execution.rb:81:in `run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:131:in `run_step'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:120:in `run_steps'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:113:in `execute_scenario_steps'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:58:in `run_scenario'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:39:in `block in run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:38:in `each'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/runner.rb:38:in `run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/cli/base.rb:64:in `run_scenario'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/cli/service_command.rb:67:in `execute'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in `run'
/usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in `run'
/usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in `run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/cli.rb:46:in `run'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:132:in `run'
/usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/bin/foreman-maintain:15:in `<top (required)>'
/usr/bin/foreman-maintain:23:in `load'
/usr/bin/foreman-maintain:23:in `<main>'
I, [2023-03-15 09:23:43+0100 #78090] INFO -- : --- Execution step 'Get status of applicable services' finished ---
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : Running command dpkg --status 'satellite' with stdin nil
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : output of the command:
dpkg-query: Paket »satellite« ist nicht installiert und es ist keine Information verfügbar
Verwenden Sie dpkg --info (= dpkg-deb --info) zum Untersuchen von Archiven.
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : Running command dpkg --status 'satellite' with stdin nil
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : output of the command:
dpkg-query: Paket »satellite« ist nicht installiert und es ist keine Information verfügbar
Verwenden Sie dpkg --info (= dpkg-deb --info) zum Untersuchen von Archiven.
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : Running command dpkg --status 'satellite-capsule' with stdin nil
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : output of the command:
dpkg-query: Paket »satellite-capsule« ist nicht installiert und es ist keine Information verfügbar
Verwenden Sie dpkg --info (= dpkg-deb --info) zum Untersuchen von Archiven.
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : Running command dpkg --status 'capsule-installer' with stdin nil
D, [2023-03-15 09:23:43+0100 #78090] DEBUG -- : output of the command:
dpkg-query: Paket »capsule-installer« ist nicht installiert und es ist keine Information verfügbar
Verwenden Sie dpkg --info (= dpkg-deb --info) zum Untersuchen von Archiven.
I, [2023-03-15 09:23:43+0100 #78090] INFO -- : === Scenario 'Status Services' finished ===
I, [2023-03-15 09:23:43+0100 #78090] INFO -- : foreman-maintain command finished with