Fix ssh connection for sbercloud.

This commit is contained in:
Vladimir Domnich 2022-07-20 14:47:20 +04:00
parent bed41402ee
commit 6545f37c9b
2 changed files with 5 additions and 2 deletions

View file

@ -90,6 +90,8 @@ setup-for-sbercloud:
cp -r $(CONFIG_DIR)/wallets $(SETUP_DIR)
# Copy neofs-adm config to setup directory (and adjust path to wallets)
cat $(CONFIG_DIR)/config.yaml | sed "s|alphabet-wallets:.*|alphabet-wallets: /.setup/alphabet-wallets|" > $(SETUP_DIR)/config.yaml
# Copy SSH key for neofs nodes
cp /jenkins/.ssh/id_rsa $(SETUP_DIR)
# Generate .env file (NEO_MAINNET_ENDPOINT might be incorrect, but we don't use it)
echo NEO_MAINNET_ENDPOINT=http://$(NODE1):40333 > .env
echo MORPH_ENDPOINT=http://$(NODE1):40332 >> .env
@ -115,6 +117,7 @@ setup-for-sbercloud:
echo NEOFS_ADM_CONFIG_PATH="/.setup/config.yaml" >> .env
# env: SSH connection to storage node host and bin directory on that host
echo STORAGE_NODE_SSH_USER="root" >> .env
echo STORAGE_NODE_SSH_PRIVATE_KEY_PATH="/.setup/id_rsa" >> .env
echo STORAGE_NODE_BIN_PATH="/usr/local/bin/" >> .env
# env: s3 gateway public key
echo S3_GATE_PUB_KEY=$(shell $(NEO_BIN_DIR)/neo-go wallet dump-keys -w $(CONFIG_DIR)/wallets/node1-s3.json | head -2 | tail -1) >> .env

View file

@ -34,7 +34,7 @@ def sbercloud_client():
pytest.fail('SberCloud infrastructure not available')
@pytest.fixture(scope='session', autouse=True)
@pytest.fixture(autouse=True)
def return_all_storage_nodes_fixture(sbercloud_client):
yield
return_all_storage_nodes(sbercloud_client)
@ -51,8 +51,8 @@ def return_all_storage_nodes(sbercloud_client: SberCloud):
for host in stopped_hosts:
with allure.step(f'Start storage node {host}'):
sbercloud_client.start_node(node_ip=host.split(':')[-2])
stopped_hosts.remove(host)
wait_all_storage_node_returned()
stopped_hosts.clear()
def is_all_storage_node_returned() -> bool: