You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The system_addnote requires 2 extra options : -s and -b
spacecmd {SSM:0}> system_addnote
system_addnote: Set a note for a system
usage: system_addnote [options]
options:
-s SUBJECT
-b BODY
The same command from the container itself works fine :
uyuni-server:~ # spacecmd -d -u admin -p master1 'system_addnote rhel8-uyuni-101.poc.com -s owner -b JOHN'
DEBUG: command=, return_value=False
DEBUG: Read configuration from /root/.spacecmd/config
DEBUG: Loading configuration section [spacecmd]
DEBUG: Current Configuration: {'server': 'localhost', 'nossl': True, 'username': 'admin', 'password': '*******'}
DEBUG: Configuration section [localhost] does not exist
DEBUG: Connecting to http://localhost/rpc/api
DEBUG: Server API Version = 27
INFO: Spacewalk Username: admin
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/ssm
DEBUG: command=, return_value=False
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/systems
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/errata
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/packages_short
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/packages_long
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/packages_by_id
INFO: Connected to http://localhost/rpc/api as admin
DEBUG: command=system_addnote rhel8-uyuni-101.poc.com -s owner -b JOHN, return_value=0
uyuni-server:~ # echo $?
0
uyuni-server:/ # spacecmd -u admin -p xxxxxx
Welcome to spacecmd, a command-line interface to Spacewalk.
Type: 'help' for a list of commands
'help ' for command-specific help
'quit' to quit
INFO: Spacewalk Username: admin
INFO: Connected to http://localhost/rpc/api as admin
spacecmd {SSM:0}> system_listnotes rhel8-uyuni-101.poc.com
13. owner (admin)
JOHN
More simpler command like system_search which doesn't have options works fine from outside :
uyuni-srv-poc-02:~ # mgrctl exec -ti -- 'spacecmd system_search rhel8-uyuni-101.poc.com '
INFO: Connected to http://localhost/rpc/api as admin
rhel8-uyuni-101.poc.com
How to make system_addnote command work when running it outside of the container ? I suspect the similar issue will take place as well for other commands which require to specify extra options.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to run mgrctl exec system_addnote command while being on host container host and receive the following error:
uyuni-srv-poc-02:~ # mgrctl exec -ti -- 'spacecmd -d system_addnote rhel8-uyuni-101.poc.com -s owner -b JOHN '
usage: spacecmd [options] [command] [-- [command options]]
spacecmd: error: unrecognized arguments: -b JOHN
The system_addnote requires 2 extra options : -s and -b
spacecmd {SSM:0}> system_addnote
system_addnote: Set a note for a system
usage: system_addnote [options]
options:
-s SUBJECT
-b BODY
The same command from the container itself works fine :
uyuni-server:~ # spacecmd -d -u admin -p master1 'system_addnote rhel8-uyuni-101.poc.com -s owner -b JOHN'
DEBUG: command=, return_value=False
DEBUG: Read configuration from /root/.spacecmd/config
DEBUG: Loading configuration section [spacecmd]
DEBUG: Current Configuration: {'server': 'localhost', 'nossl': True, 'username': 'admin', 'password': '*******'}
DEBUG: Configuration section [localhost] does not exist
DEBUG: Connecting to http://localhost/rpc/api
DEBUG: Server API Version = 27
INFO: Spacewalk Username: admin
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/ssm
DEBUG: command=, return_value=False
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/systems
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/errata
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/packages_short
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/packages_long
DEBUG: Loading cache from /root/.spacecmd/localhost/admin/packages_by_id
INFO: Connected to http://localhost/rpc/api as admin
DEBUG: command=system_addnote rhel8-uyuni-101.poc.com -s owner -b JOHN, return_value=0
uyuni-server:~ # echo $?
0
uyuni-server:/ # spacecmd -u admin -p xxxxxx
Welcome to spacecmd, a command-line interface to Spacewalk.
Type: 'help' for a list of commands
'help ' for command-specific help
'quit' to quit
INFO: Spacewalk Username: admin
INFO: Connected to http://localhost/rpc/api as admin
spacecmd {SSM:0}> system_listnotes rhel8-uyuni-101.poc.com
13. owner (admin)
JOHN
More simpler command like system_search which doesn't have options works fine from outside :
uyuni-srv-poc-02:~ # mgrctl exec -ti -- 'spacecmd system_search rhel8-uyuni-101.poc.com '
INFO: Connected to http://localhost/rpc/api as admin
rhel8-uyuni-101.poc.com
How to make system_addnote command work when running it outside of the container ? I suspect the similar issue will take place as well for other commands which require to specify extra options.
Beta Was this translation helpful? Give feedback.
All reactions