Troubleshooting spacecmd

This section provides troubleshooting solutions when working with spacecmd

1. Creating a Distribution With spacecmd Sets Localhost Instead of FQDN

The support article associated with this issue may be located at https://www.suse.com/support/kb/doc/?id=7018627

Situation

When creating a distribution with spacecmd it will automatically set localhost as the server name instead of the FQDN of SUSE Manager. This will result in the following kernel option being written:

install=http://localhost/ks/dist/<distributionname>
Resolution

Set the FQDN in $HOME/.spacecmd/config like the following:

test:~/.spacecmd # cat config

[spacecmd]
server=test.mytest.env username=admin password=password nossl=0
Cause

This problem may be experienced if $HOME/.spacecmd/config has been created and the server name option was set to localhost.

2. Spacecmd not Accepting Commands or Options

When running spacecmd non-interactively, you must escape arguments passed to the command. Always put -- before arguments, to avoid them being treated as global arguments. Additionally, make sure you escape any quotes that you pass to the functions so that they are not interpreted. An example of a well-formed spacecmd command:

spacecmd -s server1 -- softwarechannel_create -n \'My Channel\' -l channel1 -a x86_64

3. Spacecmd caching problems

The spacecmd command keeps a cache of the various systems and packages that you have installed. Sometimes, this can result in a mismatch between the system name and the system ID. To clear the spacecmd cache, use this command:

spacecmd clear_caches