hyphacoop / cosmos-ansible

Ansible scripts for spinning up Cosmos network configurations
Apache License 2.0
48 stars 15 forks source link

TASK [node : Install chain] fail #343

Closed koshak01 closed 4 months ago

koshak01 commented 1 year ago

run command:

ansible-playbook node.yml -i examples/inventory-public-testnet.yml -e 'target=cosmos.foothold.me' -Kk -vvv

result: cosmos.foothold.me : ok=19 changed=3 unreachable=0 failed=1 skipped=14 rescued=0 ignored=0


uname -a Linux cosmos-test-net 6.1.0-7-arm64 #1 SMP Debian 6.1.20-2 (2023-04-08) aarch64 GNU/Linux


go version:

go version go1.20.4 linux/arm64


gaiad version --long

name: gaia server_name: gaiad version: v10.0.2 commit: a2b14cdd568273e12b80579b4e22681df95b4cb9 build_tags: netgo,ledger go: go version go1.20.6 linux/arm64 build_deps:

verbose:

TASK [node : Install chain] **** task path: /work/cosmos-ansible/roles/node/tasks/base.yml:176

ESTABLISH SSH CONNECTION FOR USER: cosmos SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=8989 -o 'User="cosmos"' -o ConnectTimeout=10 -o 'ControlPath="/home/koshak01/.ansible/cp/58923c6287"' cosmos.foothold.me '/bin/sh -c '"'"'echo ~cosmos && sleep 0'"'"'' (0, b'/home/cosmos\n', b'') ESTABLISH SSH CONNECTION FOR USER: cosmos SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=8989 -o 'User="cosmos"' -o ConnectTimeout=10 -o 'ControlPath="/home/koshak01/.ansible/cp/58923c6287"' cosmos.foothold.me '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /var/tmp `"&& mkdir "` echo /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043 `" && echo ansible-tmp-1689213123.5073485-66873-73084428992043="` echo /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043 `" ) && sleep 0'"'"'' (0, b'ansible-tmp-1689213123.5073485-66873-73084428992043=/var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043\n', b'') Using module file /work/cosmos/lib/python3.11/site-packages/ansible/modules/command.py PUT /home/koshak01/.ansible/tmp/ansible-local-65089m8n3sjhw/tmpbs72qlcw TO /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/AnsiballZ_command.py SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=8989 -o 'User="cosmos"' -o ConnectTimeout=10 -o 'ControlPath="/home/koshak01/.ansible/cp/58923c6287"' '[cosmos.foothold.me]' (0, b'sftp> put /home/koshak01/.ansible/tmp/ansible-local-65089m8n3sjhw/tmpbs72qlcw /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/AnsiballZ_command.py\n', b'') ESTABLISH SSH CONNECTION FOR USER: cosmos SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=8989 -o 'User="cosmos"' -o ConnectTimeout=10 -o 'ControlPath="/home/koshak01/.ansible/cp/58923c6287"' cosmos.foothold.me '/bin/sh -c '"'"'setfacl -m u:gaia:r-x /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/ /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/AnsiballZ_command.py && sleep 0'"'"'' (0, b'', b'') ESTABLISH SSH CONNECTION FOR USER: cosmos SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=8989 -o 'User="cosmos"' -o ConnectTimeout=10 -o 'ControlPath="/home/koshak01/.ansible/cp/58923c6287"' -tt cosmos.foothold.me '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=igxugepvtadelmckfrvxtehrhhpjboru] password:" -u gaia /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-igxugepvtadelmckfrvxtehrhhpjboru ; /usr/bin/python3 /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/AnsiballZ_command.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded (1, b'\r\n{"changed": true, "stdout": "go install -mod=readonly -tags \\"netgo ledger\\" -ldflags \'-X github.com/cosmos/cosmos-sdk/version.Name=gaia -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad -X github.com/cosmos/cosmos-sdk/version.Version=v10.0.1 -X github.com/cosmos/cosmos-sdk/version.Commit=a51294bd988919b4f9a5ce2ad8892f90c85149af -X \\"github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger\\" -X github.com/tendermint/tendermint/version.TMCoreSemVer=v0.34.28 -w -s\' -trimpath ./...", "stderr": "# runtime\\n/usr/local/go/src/runtime/security_linux.go:14:9: undefined: secureMode\\n/usr/local/go/src/runtime/security_unix.go:55:17: undefined: fcntl\\nmake: *** [Makefile:111: install] Error 1", "rc": 2, "cmd": "PATH=$PATH:/usr/local/go/bin:$HOME/go/bin\\nmake install\\n", "start": "2023-07-12 21:52:03.786803", "end": "2023-07-12 21:52:04.585564", "delta": "0:00:00.798761", "failed": true, "msg": "non-zero return code", "invocation": {"module_args": {"chdir": "/home/gaia/chain-repo", "_raw_params": "PATH=$PATH:/usr/local/go/bin:$HOME/go/bin\\nmake install\\n", "_uses_shell": true, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "executable": null, "creates": null, "removes": null, "stdin": null}}}\r\n', b'Shared connection to cosmos.foothold.me closed.\r\n') Failed to connect to the host via ssh: Shared connection to cosmos.foothold.me closed. ESTABLISH SSH CONNECTION FOR USER: cosmos SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=8989 -o 'User="cosmos"' -o ConnectTimeout=10 -o 'ControlPath="/home/koshak01/.ansible/cp/58923c6287"' cosmos.foothold.me '/bin/sh -c '"'"'rm -f -r /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/ > /dev/null 2>&1 && sleep 0'"'"'' (0, b'', b'') fatal: [cosmos.foothold.me]: FAILED! => changed=true cmd: |- PATH=$PATH:/usr/local/go/bin:$HOME/go/bin make install delta: '0:00:00.798761' end: '2023-07-12 21:52:04.585564' invocation: module_args: _raw_params: |- PATH=$PATH:/usr/local/go/bin:$HOME/go/bin make install _uses_shell: true argv: null chdir: /home/gaia/chain-repo creates: null executable: null removes: null stdin: null stdin_add_newline: true strip_empty_ends: true msg: non-zero return code rc: 2 start: '2023-07-12 21:52:03.786803' stderr: |- # runtime /usr/local/go/src/runtime/security_linux.go:14:9: undefined: secureMode /usr/local/go/src/runtime/security_unix.go:55:17: undefined: fcntl make: *** [Makefile:111: install] Error 1 stderr_lines: stdout: go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=gaia -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad -X github.com/cosmos/cosmos-sdk/version.Version=v10.0.1 -X github.com/cosmos/cosmos-sdk/version.Commit=a51294bd988919b4f9a5ce2ad8892f90c85149af -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" -X github.com/tendermint/tendermint/version.TMCoreSemVer=v0.34.28 -w -s' -trimpath ./... stdout_lines:
dasanchez commented 1 year ago

Hi @koshak01 ! It looks like the make install command for building gaia failed, how were you able to run gaia version --long?

koshak01 commented 1 year ago

i put it through a script (https://github.com/cosmos/testnets/tree/master/public)

file: public/join-public-testnet.sh

just changed architecture to arm64

#!/bin/bash
# Set up a Gaia service to join the Cosmos Hub public testnet.

# Configuration
# You should only have to modify the values in this block
# ***
NODE_HOME=~/.gaia
NODE_MONIKER=public-testnet
SERVICE_NAME=gaiad
GAIA_VERSION=v10.0.1
ARCH=arm64
CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$GAIA_VERSION/gaiad-$GAIA_VERSION-linux-$ARCH

..........

dasanchez commented 1 year ago

Right, that script downloads the pre-built binary from the Gaia releases page. You can download the same binary with this command:

ansible-playbook node.yml -i examples/inventory-public-testnet.yml -e 'target=cosmos.foothold.me chain_binary_release=https://github.com/cosmos/gaia/releases/download/v10.0.2/gaiad-v10.0.2-linux-arm64 chain_binary_source=release' -Kk -vvv