ClusterLabs/striker

Node stage 2 install fails " Failed to read the file: [/root/.ssh/known_hosts]. The error was: [Permission denied]."

Closed this issue · 2 comments

Stage 2 install fails, -vvv reports the following after updating system password:

2017-04-06 14:02:02 - Remote.pm 212; [ Debug ] - users_home: [/root]
2017-04-06 14:02:02 - Remote.pm 223; [ Debug ] - known_hosts: [/root/.ssh/known_hosts]
2017-04-06 14:02:02 - Remote.pm 824; [ Entering: _call_ssh_keyscan() ] - Variables:
|- target: [10.20.10.1]
|- port: [22]
|- user: [root]
- known_hosts: [/root/.ssh/known_hosts]
2017-04-06 14:02:02 - Remote.pm 830; [ Debug ] - Adding the target: [10.20.10.1]:[22]'s RSA fingerprint to: [root]'s list of known hosts...
2017-04-06 14:02:02 - Remote.pm 838; [ Debug ] - shell_call: [/usr/bin/ssh-keyscan 10.20.10.1 >> /root/.ssh/known_hosts]
2017-04-06 14:02:02 - Remote.pm 851; [ Debug ] - shell_call: [/bin/chown root:root /root/.ssh/known_hosts]
2017-04-06 14:02:02 - Remote.pm 253; [ Debug ] - added: [0]
2017-04-06 14:02:02 - Remote.pm 869; [ Entering: _check_known_hosts_for_target() ] -
2017-04-06 14:02:02 - Remote.pm 882; [ Debug ] - Variables:
|- target: [10.20.10.1]
|- port: [22]
|- known_hosts: [/root/.ssh/known_hosts]
|- user: [root]
- delete_if_found: [0]
2017-04-06 14:02:02 - Remote.pm 889; [ Debug ] - shell_call: [/root/.ssh/known_hosts]
2017-04-06 14:02:02 - Alert.pm 303; [ Entering: error() ] -
2017-04-06 14:02:02 - Readable.pm 464; [ Entering: comma() ] -
2017-04-06 14:02:02:
-=] Error - Error Code 2 - Fatal Error - Remote.pm at 890 [=-

Failed to read the file: [/root/.ssh/known_hosts]. The error was: [Permission denied].

Exiting.

It looks like it's trying to add the key to the /root/ user when it should be writing to apache's .ssh. Will investigate further, thanks for reporting.

Fixed in d497a66.