Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ aws::fetch_poppa_id() {
log::info "Setting Poppa ID"

# Generate the org-tag fetching script
rollbar::fatal_trap \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this a warning? if this fails we need the server to halt right

Copy link
Contributor Author

@henrymollman henrymollman May 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if its a warning, won't that mean it never halts? we want to keep retrying in this case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your right, I thought this was after the loop

rollbar::warning_trap \
"Dock-Init: Failed to Render Org Script" \
"Consule-Template was unable to realize the given template."

Expand Down
5 changes: 5 additions & 0 deletions lib/vault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ vault::set_s3_keys() {

# creates a token for a the organizations-readonly policy
vault::store_private_registry_token() {
rollbar::fatal_trap \
"Dock-Init: Cannot store private registry token" \
"The user vault token was not generated"

log::info "Storing vault token for private registry key"
local NODE_ENV=$(consul::get node/env)
local token_path="${DOCK_INIT_BASE}/consul-resources/vault/${NODE_ENV}"
Expand All @@ -72,4 +76,5 @@ vault::store_private_registry_token() {
vault token-create -policy=dock-${POPPA_ID} | awk '/token/ { print $2 }' | awk 'NR==1 { print $1 }' > /opt/runnable/dock-init/user-private-registry-token
VAULT_TOKEN=$(cat "${token_path}"/auth-token)
export VAULT_TOKEN
rollbar::clear_trap
}