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

False Missing patches indication #4922

Closed
dsiminiuk opened this issue Apr 14, 2020 · 13 comments · Fixed by #5509
Closed

False Missing patches indication #4922

dsiminiuk opened this issue Apr 14, 2020 · 13 comments · Fixed by #5509

Comments

@dsiminiuk
Copy link

XO origin: the sources via XenOrchestraInstallerUpdater script
Versions:
Node: 12.16.1
xo-web: 5.58.2
xo-server: 5.58.2

When there are no patches to be applied to a host, the Pools page should not indicate there are.

When there is one host shut down (in a two server pool) there is indication of missing patches. When the servers are all powered on there is no indication of required patches.

image

@olivierlambert
Copy link
Member

Hmm could it be an exception of the offline host badly interpreted as a missing patch?

@dsiminiuk
Copy link
Author

@olivierlambert I don't think so because I tried shutting down the server both ways, from XO and from the host console, and it appears the same "Missing Patches" for both methods.

@pdonias
Copy link
Member

pdonias commented Apr 14, 2020

Hi @dsiminiuk, does the patches table also show a missing patch? (pools/<id>/patches page). Are they XenServer or XCP-ng hosts? And what version?
Thanks!

@dsiminiuk
Copy link
Author

dsiminiuk commented Apr 14, 2020

@pdonias Nothing there.

image

Hosts are both...
Version | 8.1.0 ()
Build Number | release/quebec/master/17

@dsiminiuk
Copy link
Author

@pdonias Today, XO indicated that I have 6 patches to apply to my pool. On the Patches tab there are only 5 listed. So the incorrect patch indication is still adding an extra 1 to the actual number.

I powered up my offline host and the number indicated dropped to 5 on the Pool. I installed all the patches and powered off the host that is usually offline and the indication returned to 1.

The false +1 patch persists even when real patches are available if the one host is powered off.

pdonias added a commit that referenced this issue Apr 17, 2020
Fixes #4922

We already filter out XSxx patches from normal patches (XSxxExxx) since they're
special patches that are meant to upgrade the host to the next version.
Since XenServer has been renamed Citrix Hypervisor, patches names now start
with the letters "CH" so we also need to filter out CHxx patches.
@pdonias
Copy link
Member

pdonias commented Apr 17, 2020

Hi @dsiminiuk, thanks for the details.

Would you be able to test it on the branch pierre-fix-false-missing-patch? I wasn't able to reproduce this exact behaviour but I'm not sure if I'm in the exact same state as you and I still think this may fix it.

Thanks!

@dsiminiuk
Copy link
Author

@pdonias My previous post was incorrect. Please ignore.

I have rebuilt XO from the 3f7e62a "pierre-fix-false-missing-patch" branch and the problem remains.

xo-server 5.58.2
xo-web 5.58.2

pdonias added a commit that referenced this issue Apr 21, 2020
Fixes #4922

We already filter out XSxx patches from normal patches (XSxxExxx) since they're
special patches that are meant to upgrade the host to the next version.
Since XenServer has been renamed Citrix Hypervisor, patches names now start
with the letters "CH" so we also need to filter out CHxx patches.
@dsiminiuk
Copy link
Author

@pdonias How do I test this?

I built 06d6764 master and the pierre-fix-false-missing-patch 3f7e62a branch but both still exhibit the issue.

@pdonias
Copy link
Member

pdonias commented Apr 22, 2020

@dsiminiuk So after trying quite a few things, I think I finally understand what's happening on your side. I think your slave host is missing one patch (or was missing a patch the last time it was connected to the master) and your master host isn't missing any, which would explain the difference between the Home page warning and the Patches tab.

Could you try and confirm that by inspecting which host is missing which patches with xo-cli?

npm i -g xo-cli
xo-cli --register <XO_ADDRESS> <YOUR_LOGIN> <YOUR_PASSWORD>
xo-cli pool.listMissingPatches host=<SLAVE_UUID>
xo-cli pool.listMissingPatches host=<MASTER_UUID>

As for 06d6764, it needed to be fixed anyway so we merged it, but thanks for testing it!

@dsiminiuk
Copy link
Author

dsiminiuk commented Apr 22, 2020

@pdonias

After npm install and xo-cli registration.
Check slave and then master,,,

[root@xo ~]# xo-cli pool.listMissingPatches host=cdb42b94-7ec6-47b4-aaef-d4c52f6bd7b3
[]
[root@xo ~]# xo-cli pool.listMissingPatches host=1139bfbc-c487-4311-8206-bbffe96ed6b1
[]

If you would like remote control of my desktop I can share.

@dsiminiuk
Copy link
Author

@pdonias
I updated from yesterday's code and this issue is no longer visible in the web UI.
I want to do a couple more builds before I say it's resolved.

@dsiminiuk
Copy link
Author

Not resolved. I was adding both servers to the XO UI, now I have just the pool master in Servers/Settings. I thought this might have an impact on this issue but it doesn't. It's still an issue.

@dsiminiuk
Copy link
Author

If I do a new build of XO the missing patches indication goes away. As soon as I power up host2 and shut it down again, the missing patches indicator comes back. A clue maybe?

pdonias added a commit that referenced this issue Jan 15, 2021
Fixes #4922
Fixes xoa-support#3216

- xo-server: get error message from updater.py plugin's message and throw it
- xo-web: when counting missing patches, ignore hosts that failed
pdonias added a commit that referenced this issue Jan 19, 2021
Fixes #4922
Fixes xoa-support#3216

- xo-server: get error message from updater.py plugin's message and throw it
- xo-web: when counting missing patches, ignore hosts that failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment