Skip to content

Commit

Permalink
Merge pull request #682 from subutai-io/fix
Browse files Browse the repository at this point in the history
no ssh key error
  • Loading branch information
Erkin Matkaziev authored Mar 2, 2018
2 parents ae311d6 + 11b9809 commit 3da0875
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions hub/include/HubController.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ typedef enum ssh_desktop_launch_error {
SDLE_CONT_NOT_READY,
SDLE_JOIN_TO_SWARM_FAILED,
SDLE_SYSTEM_CALL_FAILED,
SDLE_NO_KEY_DEPLOYED,
SDLE_LAST_ERR
} ssh_desktop_launch_error_t;

Expand Down
8 changes: 6 additions & 2 deletions hub/src/HubController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ ssh_desktop_launch_error_t CHubController::ssh_to_container_internal(const CEnvi
if (container_status != SDLE_SUCCESS) {
return container_status;
}
if(key.isEmpty()){
return SDLE_NO_KEY_DEPLOYED;
}
system_call_wrapper_error_t run_in_terminal_status = ssh_to_container_in_terminal(cont, key);
if (run_in_terminal_status != SCWE_SUCCESS) {
QString err_msg = tr("Run SSH failed. Error code : %1")
Expand Down Expand Up @@ -480,8 +483,9 @@ const QString &CHubController::ssh_desktop_launch_err_to_str(int err) {
"Container not found",
"Container isn't ready",
"Join to p2p swarm failed",
"System call failed"};
return lst_err_str[err % SDLE_LAST_ERR];
"System call failed",
"No key deployed"};
return lst_err_str[err % SDLE_LAST_ERR];
}

const QString CHubController::get_env_key(const QString &env_id) {
Expand Down

0 comments on commit 3da0875

Please sign in to comment.