Skip to content

Commit

Permalink
fix: a2ha command issue (chef#6230)
Browse files Browse the repository at this point in the history
Signed-off-by: meet58 <mgadhiya@msystechnologies.com>
  • Loading branch information
meet58 authored Nov 22, 2021
1 parent a7ac1e3 commit 07703bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion components/automate-backend-deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ This provides the `automate-backend-deployment` package.
This package will build a package using terraform/a2ha-terraform, inspecs, test, certs and Makefile.

This is the heart of the a2ha because this component will set up a workspace for a2ha and all the a2ha command will get avilable after installing this package.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def service_data(service)
census = nil
ssh = AutomateCluster::SSH.new
ssh.connections(service: service) do |type, conn|
service_name = "automate-backend-#{service}"
service_name = "automate-ha-#{service}"
data = conn.curl_hab("/services/#{service_name}/default")
health = conn.curl_hab("/services/#{service_name}/default/health")
member_id = data.dig("sys", "member_id")
Expand Down
2 changes: 1 addition & 1 deletion components/automate-ha-pgleaderchk/habitat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This pkg expects to bind to PostgreSQL as `database` in order to use `port`, `su

example:
```bash
hab svc load chef/automate-backend-pgleaderchk --bind database:automate-backend-postgresql.default
hab svc load chef/automate-ha-pgleaderchk --bind database:automate-ha-postgresql.default
```

## Topologies
Expand Down
6 changes: 3 additions & 3 deletions test/lib/credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def bash_script(cmds)
def hab_config_apply(args = {})
service = args[:service_name]
leader = utils.pg_hab_elected_leader
utils.backend_logger.info "Querying Habitat for existing automate-backend-#{service} Gossip Layer Config on #{leader}.."
utils.backend_logger.info "Querying Habitat for existing automate-ha-#{service} Gossip Layer Config on #{leader}.."
script = bash_script <<~SCRIPT
/bin/hab pkg exec chef/automate-backend-ctl automate-backend-ctl applied --svc=automate-backend-#{service} \
/bin/hab pkg exec chef/automate-ha-ctl automate-backend-ctl applied --svc=automate-ha-#{service} \
| grep -v "DEBUG\\|INFO\\|WARN\\|ERROR\\|FATAL" 2>&1
SCRIPT
local_script_file = Tempfile.new('script')
Expand Down Expand Up @@ -220,7 +220,7 @@ def hab_config_apply(args = {})
# kill any existing stuck reconfigure hooks
pkill -9 reconfigure || true
[ -s #{remote_patch_filename} ] && cat #{remote_patch_filename} | /bin/hab config \
apply automate-backend-#{service}.default #{Time.now.to_i}
apply automate-ha-#{service}.default #{Time.now.to_i}
rm -f #{remote_patch_filename}
SCRIPT
local_script_file = Tempfile.new('script')
Expand Down

0 comments on commit 07703bc

Please sign in to comment.