<< Back to previous view |
[QB-3884] User Attributes in QuickBuild and attributes.properties are not in sync
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 11.0.28 |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Phong Trinh | Assigned To: | Robin Shen |
Resolution: | Cannot Reproduce | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown |
Description |
- On one of our QuickBuild agent, I set its user attribute named CleanMachine equals to 1 and made sure this attribute and its value in its attributes.properties are the same ( CleanMachine=1)Then I took a snapshot of this machine.
- I had a configuration to run tests on this machine. After the tests were done, it set the attribute, CleanMachine equals to 0 (for taking this machine out of the pool. So other tests would not jump on this machine right away) and then reverted the machine to the snapshot. - I expected that CleanMachine would set back 1 in Grid after the reversion was done, but it was not. Although CleanMachine equals to 1 in attributes.properties. Please look into this when you have very early chance or give me any alternative/workaround on this. Thanks |
Comments |
Comment by Robin Shen [ 07/Sep/22 02:12 PM ] |
Please restart agent after reversion to see if attributes can be synchronized. |
Comment by Phong Trinh [ 07/Sep/22 03:06 PM ] |
I rebooted the agent, but the attributes were still not synchronized. |
Comment by Robin Shen [ 08/Sep/22 07:56 AM ] |
This is odd. Please stop the agent, waiting for it to be removed from active agent list, and start again to see it works. |
Comment by Phong Trinh [ 09/Sep/22 03:20 AM ] |
Thank you for prompt response. It works with stopping and then starting the agent as your suggestion. However, it may not work for my test automation, since I cannot revert and stop/start agent in one automation and have many agents and tests that are running in parallel. |
Comment by Robin Shen [ 09/Sep/22 08:06 AM ] |
Without restarting the agent, QB has no chance to know the agent attribute is updated. |
Comment by Phong Trinh [ 09/Sep/22 01:41 PM ] |
Thanks, again!
Looks like QB updates agent's attributes after the agent is re-started. I am curious that when I revert the machine/agent, QB also loses the connection to the agent and reconnects to it successfully. Why the attributes are not updated? |
Comment by Robin Shen [ 09/Sep/22 02:17 PM ] |
QB only thinks that the connection is temporarily down, and if it reconnects, it thinks network comes back, but in this case there is no reason to re-sync the attributes. |
Comment by Phong Trinh [ 09/Sep/22 05:05 PM ] |
Is it possible if QB re-syncs the attributes every re-connection? I think that is helpful and keeps the attributes in sync. |
Comment by Robin Shen [ 09/Sep/22 11:35 PM ] |
Seems that in your case, your agent reconnects shortly after a snapshot restore, and QB actually does not detect a connection loss. You will have to add some logic to make snapshot restore a bit longer to wait for agent to be timedout. In that case, QB server console will display something like:
Active build agent 'agentmachine:8811' timed out, removing.. Otherwise, everything seems fine to QB server, and there is no reason to reload attributes from time to time. |
Comment by Phong Trinh [ 10/Sep/22 11:38 PM ] |
I will do as your suggestion and let you know. Thanks! |
Comment by Phong Trinh [ 14/Sep/22 01:58 PM ] |
I changed 'Agent Timeout' setting to shorter time instead of making the reversion to take longer and then reverted the agents. I still received the the same issue. The OS of these agents Windows 11. Do you think the OS causes the issue? |
Comment by Robin Shen [ 14/Sep/22 10:57 PM ] |
OS is not an issue. When snapshot is being restore, please check server log to see if agent is timedout. Only in that case, reconneted agent will reload the attributes. |