awx icon indicating copy to clipboard operation
awx copied to clipboard

all cluster nodes in development environment have the same UUID

Open kdelee opened this issue 1 year ago • 5 comments

Please confirm the following

  • [X] I agree to follow this project's code of conduct.
  • [X] I have checked the current issues for duplicates.
  • [X] I understand that AWX is open source software provided for free and that I might not receive a timely response.

Bug Summary

All the cluster nodes when you use https://github.com/ansible/awx/blob/882d2fdbe859d475b1fd9fb47e71a22f68fe4fd8/Makefile#L453 have the same UUID: https://github.com/ansible/awx/blob/41e3a69001508836f3b19c10f15d6df0812006da/tools/docker-compose/ansible/roles/sources/files/local_settings.py#L22

This causes issues with some metrics, because they use the UUID: https://github.com/ansible/awx/blob/882d2fdbe859d475b1fd9fb47e71a22f68fe4fd8/awx/main/analytics/collectors.py#L257

So for those metrics in the dev environment, we don't get one per instance when we don't have unique UUIDs.

AWX version

devel

Select the relevant components

  • [ ] UI
  • [ ] API
  • [ ] Docs
  • [ ] Collection
  • [ ] CLI
  • [X] Other

Installation method

docker development environment

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

run with multiple cluster nodes

Expected results

different UUIDs for each node

Actual results

same UUID

Additional information

No response

kdelee avatar Oct 10 '22 18:10 kdelee

Hi, I want to work on this issue, I'm a newbie. Would anyone be able to help solve this issue? @kdelee @sarabrajsingh

Tanmoy037 avatar Mar 24 '23 17:03 Tanmoy037

I can pick it up, UUID needs to be randomised? or something else.

darshanip avatar Apr 25 '23 14:04 darshanip

Hi @kdelee, I was trying to reproduce the issue, however ending up with unique UUIDs for instances. Has this issue been solved already? if not, would you please recommend steps to reproduce this? Thank you

awx_instance_cpu{hostname="awx_1",instance_uuid="78e385f5-4da4-4f88-8462-0d9a5bf2b6c2"} 5.0
awx_instance_cpu{hostname="awx_2",instance_uuid="bd318568-b634-4b4c-80e5-7f93f30eb428"} 5.0
awx_instance_cpu{hostname="awx_3",instance_uuid="29055928-dce8-4f4d-bbcb-4a422ed2459d"} 5.0
awx_instance_cpu{hostname="awx_4",instance_uuid="a0a57609-c6a5-4c90-a5b8-f47eae1f59e6"} 5.0

mandar242 avatar Aug 07 '23 19:08 mandar242

Hello there! @kdelee, If this issue is still open, can you please assign it to me? I'm a newbie but ill try my best to resolve this issue

0x00zer0day avatar Sep 10 '23 18:09 0x00zer0day

I couldn't reproduce the issue on versions 23.7.0 and 24.2.0 too. Here are the steps I tried:

  1. Build the dev environment, as described in the documentation
  2. Run it using the command CONTROL_PLANE_NODE_COUNT=2 EXECUTION_NODE_COUNT=2 COMPOSE_TAG=devel make docker-compose
  3. Open https://localhost:8043/api/v2/metrics and log in with my username and password
  4. Ensure all nodes has unique UUID:
# TYPE awx_instance_cpu gauge
awx_instance_cpu{hostname="awx_1",instance_uuid="7f3a4c38-0a11-4d36-9c37-6c74cf5db14d"} 12.0
awx_instance_cpu{hostname="awx_2",instance_uuid="d52a775b-2da9-42a5-94ba-ac998d2351c7"} 12.0
awx_instance_cpu{hostname="receptor-1",instance_uuid="8438618a-3021-40a6-accb-deac7cdf4bdd"} 12.0
awx_instance_cpu{hostname="receptor-2",instance_uuid="b303afa8-4b65-441f-a291-5c7cea2ba877"} 12.0

spaut33 avatar Apr 18 '24 11:04 spaut33