hyphacoop/cosmos-ansible

TASK [node : Install chain] fail

koshak01 opened this issue · 3 comments

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:

  • cosmossdk.io/api@v0.2.6
  • cosmossdk.io/core@v0.5.1
  • cosmossdk.io/depinject@v1.0.0-alpha.3
  • filippo.io/edwards25519@v1.0.0-rc.1
  • github.com/99designs/keyring@v1.2.1 => github.com/cosmos/keyring@v1.2.0
  • github.com/ChainSafe/go-schnorrkel@v1.0.0
  • github.com/Workiva/go-datastructures@v1.0.53
  • github.com/armon/go-metrics@v0.4.1
  • github.com/beorn7/perks@v1.0.1
  • github.com/bgentry/speakeasy@v0.1.1-0.20220910012023-760eaf8b6816
  • github.com/btcsuite/btcd/btcec/v2@v2.3.2
  • github.com/cenkalti/backoff/v4@v4.1.3
  • github.com/cespare/xxhash/v2@v2.1.2
  • github.com/coinbase/rosetta-sdk-go@v0.7.9
  • github.com/cometbft/cometbft-db@v0.7.0
  • github.com/confio/ics23/go@v0.9.0
  • github.com/cosmos/btcutil@v1.0.4
  • github.com/cosmos/cosmos-db@v0.0.0-20221226095112-f3c38ecb5e32
  • github.com/cosmos/cosmos-proto@v1.0.0-beta.1
  • github.com/cosmos/cosmos-sdk@v0.45.16-ics
  • github.com/cosmos/go-bip39@v1.0.0
  • github.com/cosmos/iavl@v0.19.5
  • github.com/cosmos/ibc-go/v4@v4.4.2
  • github.com/cosmos/interchain-security@v1.1.0-multiden
  • github.com/cosmos/ledger-cosmos-go@v0.12.2
  • github.com/creachadair/taskgroup@v0.3.2
  • github.com/davecgh/go-spew@v1.1.1
  • github.com/decred/dcrd/dcrec/secp256k1/v4@v4.0.1
  • github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f
  • github.com/dvsekhvalnov/jose2go@v1.5.0
  • github.com/felixge/httpsnoop@v1.0.2
  • github.com/fsnotify/fsnotify@v1.6.0
  • github.com/go-kit/kit@v0.12.0
  • github.com/go-kit/log@v0.2.1
  • github.com/go-logfmt/logfmt@v0.5.1
  • github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2
  • github.com/gogo/gateway@v1.1.0
  • github.com/gogo/protobuf@v1.3.3 => github.com/regen-network/protobuf@v1.3.3-alpha.regen.1
  • github.com/golang/protobuf@v1.5.2
  • github.com/golang/snappy@v0.0.4
  • github.com/google/btree@v1.1.2
  • github.com/google/orderedcode@v0.0.1
  • github.com/gorilla/handlers@v1.5.1
  • github.com/gorilla/mux@v1.8.0
  • github.com/gorilla/websocket@v1.5.0
  • github.com/gravity-devs/liquidity@v1.5.3
  • github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0
  • github.com/grpc-ecosystem/grpc-gateway@v1.16.0
  • github.com/grpc-ecosystem/grpc-gateway/v2@v2.10.2
  • github.com/gsterjov/go-libsecret@v0.0.0-20161001094733-a6f4afe4910c
  • github.com/gtank/merlin@v0.1.1
  • github.com/gtank/ristretto255@v0.1.2
  • github.com/hashicorp/go-immutable-radix@v1.3.1
  • github.com/hashicorp/golang-lru@v0.5.5-0.20210104140557-80c98217689d
  • github.com/hashicorp/hcl@v1.0.0
  • github.com/hdevalence/ed25519consensus@v0.0.0-20220222234857-c00d1f31bab3
  • github.com/iancoleman/orderedmap@v0.2.0
  • github.com/improbable-eng/grpc-web@v0.15.0
  • github.com/klauspost/compress@v1.15.11
  • github.com/lib/pq@v1.10.6
  • github.com/libp2p/go-buffer-pool@v0.1.0
  • github.com/magiconair/properties@v1.8.6
  • github.com/mattn/go-colorable@v0.1.13
  • github.com/mattn/go-isatty@v0.0.16
  • github.com/matttproud/golang_protobuf_extensions@v1.0.2-0.20181231171920-c182affec369
  • github.com/mimoo/StrobeGo@v0.0.0-20210601165009-122bf33a46e0
  • github.com/minio/highwayhash@v1.0.2
  • github.com/mitchellh/mapstructure@v1.5.0
  • github.com/mtibben/percent@v0.2.1
  • github.com/pelletier/go-toml/v2@v2.0.5
  • github.com/pkg/errors@v0.9.1
  • github.com/pmezard/go-difflib@v1.0.0
  • github.com/prometheus/client_golang@v1.14.0
  • github.com/prometheus/client_model@v0.3.0
  • github.com/prometheus/common@v0.37.0
  • github.com/prometheus/procfs@v0.8.0
  • github.com/rakyll/statik@v0.1.7
  • github.com/rcrowley/go-metrics@v0.0.0-20201227073835-cf1acfcdf475
  • github.com/regen-network/cosmos-proto@v0.3.1
  • github.com/rs/cors@v1.8.2
  • github.com/rs/zerolog@v1.27.0
  • github.com/spf13/afero@v1.9.2
  • github.com/spf13/cast@v1.5.0
  • github.com/spf13/cobra@v1.6.1
  • github.com/spf13/jwalterweatherman@v1.1.0
  • github.com/spf13/pflag@v1.0.5
  • github.com/spf13/viper@v1.14.0
  • github.com/strangelove-ventures/packet-forward-middleware/v4@v4.0.4
  • github.com/stretchr/testify@v1.8.2
  • github.com/subosito/gotenv@v1.4.1
  • github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7
  • github.com/tendermint/go-amino@v0.16.0
  • github.com/tendermint/tendermint@v0.34.27 => github.com/cometbft/cometbft@v0.34.29
  • github.com/tendermint/tm-db@v0.6.7
  • github.com/tidwall/btree@v1.5.0
  • github.com/zondax/hid@v0.9.1
  • github.com/zondax/ledger-go@v0.14.1
  • golang.org/x/crypto@v0.5.0
  • golang.org/x/exp@v0.0.0-20221205204356-47842c84f3db
  • golang.org/x/net@v0.7.0
  • golang.org/x/sys@v0.5.0
  • golang.org/x/term@v0.5.0
  • golang.org/x/text@v0.7.0
  • google.golang.org/genproto@v0.0.0-20230125152338-dcaf20b6aeaa
  • google.golang.org/grpc@v1.52.3 => google.golang.org/grpc@v1.33.2
  • google.golang.org/protobuf@v1.28.2-0.20220831092852-f930b1dc76e8
  • gopkg.in/ini.v1@v1.67.0
  • gopkg.in/yaml.v2@v2.4.0
  • gopkg.in/yaml.v3@v3.0.1
  • nhooyr.io/websocket@v1.8.6
    cosmos_sdk_version: v0.45.16-ics

verbose:

TASK [node : Install chain] ************************************************************************************************************************************************************************
task path: /work/cosmos-ansible/roles/node/tasks/base.yml:176
<cosmos.foothold.me> ESTABLISH SSH CONNECTION FOR USER: cosmos
<cosmos.foothold.me> 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'"'"''
<cosmos.foothold.me> (0, b'/home/cosmos\n', b'')
<cosmos.foothold.me> ESTABLISH SSH CONNECTION FOR USER: cosmos
<cosmos.foothold.me> 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'"'"''
<cosmos.foothold.me> (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
<cosmos.foothold.me> PUT /home/koshak01/.ansible/tmp/ansible-local-65089m8n3sjhw/tmpbs72qlcw TO /var/tmp/ansible-tmp-1689213123.5073485-66873-73084428992043/AnsiballZ_command.py
<cosmos.foothold.me> 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]'
<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'')
<cosmos.foothold.me> ESTABLISH SSH CONNECTION FOR USER: cosmos
<cosmos.foothold.me> 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'"'"''
<cosmos.foothold.me> (0, b'', b'')
<cosmos.foothold.me> ESTABLISH SSH CONNECTION FOR USER: cosmos
<cosmos.foothold.me> 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
<cosmos.foothold.me> (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')
<cosmos.foothold.me> Failed to connect to the host via ssh: Shared connection to cosmos.foothold.me closed.
<cosmos.foothold.me> ESTABLISH SSH CONNECTION FOR USER: cosmos
<cosmos.foothold.me> 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'"'"''
<cosmos.foothold.me> (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:

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

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

..........

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