Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest genesis is having issue in pipeline #91

Closed
bodymindarts opened this issue Nov 2, 2016 · 8 comments
Closed

Latest genesis is having issue in pipeline #91

bodymindarts opened this issue Nov 2, 2016 · 8 comments

Comments

@bodymindarts
Copy link

bodymindarts commented Nov 2, 2016

After updating genesis every pipeline has this issue:

High-Availability Enabled: true
	Mode: active
	Leader: https://acf-global-proto-vault-0.10.4.1.16:8200

Testing Vault authentication by retrieving secret/handshake
Key             	Value
---             	-----
refresh_interval	2592000
knock           	knock

jq: error: Cannot index object with null
Enter host password for user '':
@jhunt
Copy link
Contributor

jhunt commented Nov 2, 2016

What version of Genesis?

@bodymindarts
Copy link
Author

v1.5.6

@jhunt
Copy link
Contributor

jhunt commented Nov 2, 2016

Oh, this is the release you cut this morning?

@bodymindarts
Copy link
Author

yes

@jhunt
Copy link
Contributor

jhunt commented Nov 2, 2016

Can you modify the embedded genesis to put a set -x up near the top to see where it's failing?

@bodymindarts
Copy link
Author

+ vault read secret/handshake
Key                 Value
---                 -----
refresh_interval    2592000
knock               knock
+ echo

+ preflight_deployment
+ [[ -n '' ]]
+ must_be_in_an_environment
+ setup
+ [[ /tmp/build/028a4217/out/git != \u\n\s\e\t ]]
+ return
+ [[ -z alpha ]]
+ case ${DEPLOYMENT_TYPE} in
+ preflight_normal_deployment
+ [[ ! -f /tmp/build/028a4217/out/git/acf-global/alpha/.site/stemcell/name ]]
++ cat /tmp/build/028a4217/out/git/acf-global/alpha/.site/stemcell/name
+ local stemcell_name=bosh-aws-xen-hvm-ubuntu-trusty-go_agent
+ [[ ! -f /tmp/build/028a4217/out/git/acf-global/alpha/.site/stemcell/version ]]
++ cat /tmp/build/028a4217/out/git/acf-global/alpha/.site/stemcell/version
+ local stemcell_version=3263.8
+ [[ 3263.8 == \l\a\t\e\s\t ]]
+ ensure_present stemcell bosh-aws-xen-hvm-ubuntu-trusty-go_agent 3263.8
+ local type=stemcell
+ shift
+ local name=bosh-aws-xen-hvm-ubuntu-trusty-go_agent
+ shift
+ local version=3263.8
+ shift
+ [[ 3263.8 != \t\r\a\c\k ]]
+ have_blob stemcell bosh-aws-xen-hvm-ubuntu-trusty-go_agent 3263.8
+ local type=stemcell
+ shift
+ local name=bosh-aws-xen-hvm-ubuntu-trusty-go_agent
+ shift
+ local version=3263.8
+ shift
+ need_a_bosh
+ setup
+ [[ /tmp/build/028a4217/out/git != \u\n\s\e\t ]]
+ return
+ [[ -n '' ]]
+ [[ -f /root/.bosh_config ]]
++ spruce json /root/.bosh_config
++ jq -r .target
+ DIRECTOR_URL=null
++ spruce json /root/.bosh_config
++ jq -r '.auth[.target].username + ":" + .auth[.target].password'
jq: error: Cannot index object with null
+ DIRECTOR_CREDS=
++ curl -m3 -Lks -u '' null/info
++ jq -r .uuid
Enter host password for user '':

@bodymindarts
Copy link
Author

bodymindarts commented Nov 2, 2016

Looks like the issue are these lines

need_a_bosh() {
    setup
    if [[ -n ${DIRECTOR_URL} ]]; then
        return
    fi

    # Interrogate bosh_config for director-y things
    if [[ -f ~/.bosh_config ]]; then
        DIRECTOR_URL=$(spruce json ~/.bosh_config | jq -r .target)
        DIRECTOR_CREDS=$(spruce json ~/.bosh_config | jq -r '.auth[.target].username + ":" + .auth[.target].password')
        DIRECTOR_UUID=$(curl -m${DIRECTOR_TIMEOUT:-3} -Lks -u "${DIRECTOR_CREDS}" ${DIRECTOR_URL}/info | jq -r .uuid)
    fi
}

This code expects the bosh target to already have been set DIRECTOR_URL=$(spruce json ~/.bosh_config | jq -r .target)
But in the pipeline it needs to read the target from the manifests .director_uuid

@bodymindarts
Copy link
Author

#92 fixes this with a work around. Let me know if you can think of a cleaner solution @jhunt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants