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

Fix "Label-performaceCPU-avg-freq" doesn't exist #6

Closed
gangsterrapper22 opened this issue Apr 5, 2018 · 24 comments
Closed

Fix "Label-performaceCPU-avg-freq" doesn't exist #6

gangsterrapper22 opened this issue Apr 5, 2018 · 24 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@gangsterrapper22
Copy link
Collaborator

gangsterrapper22 commented Apr 5, 2018

I compiled with VS 2013 the XCG-ng Center and when I am conntect
to an Server and Click on the Performance tab, then the error appears "Label-performaceCPU-avg-freq" doesn't exist. I don't know if this can be solved in the source code of XCP-ng itself or should be solved in the XCP-ng Center Application.
An Workaround where to get the Count of the CPU's and let dynamically add the Value of the Label "Label-performaceCPU-avg-freq" I have added an Screenshot of the Error message. If you click on Ignore then you will get this error message for every CPU Core.

bildschirmfoto 2018-04-05 um 18 27 55

@gangsterrapper22 gangsterrapper22 added bug Something isn't working help wanted Extra attention is needed labels Apr 5, 2018
@borzel borzel added this to the Distributable "XenCenter" for next XCP-ng release milestone Apr 9, 2018
@cocoon
Copy link
Collaborator

cocoon commented Apr 9, 2018

The simple solution:
Compile as "Release" not as "Debug".

Popup comes from here:
https://github.com/xcp-ng/xenadmin/blob/master/XenModel/Utils/PropertyManager.cs#L51

FirendlyNames are for example defined here:
https://github.com/xcp-ng/xenadmin/blob/master/XenModel/FriendlyNames.resx#L732

And some checks are coming from around here:
https://github.com/xcp-ng/xenadmin/blob/master/XenModel/Utils/Helpers.cs#L1003

@gangsterrapper22
Copy link
Collaborator Author

Thanks for the hint. From where the Error come I already knew, but I didn’t know how to solve it properly. When I compiled it as release, I also got an error message but it had an other text. I think the problem was, that I have compiled it with the DLL files from nugget and not with the one from Citrix, because I didn’t get any error message now but I can’t tell it for sure.

@borzel
Copy link
Member

borzel commented Apr 9, 2018

It's the same here in my home testlab :-|

@gangsterrapper22
Copy link
Collaborator Author

@borzel Do you only get it when you compile it as debug or also as Release?

@borzel
Copy link
Member

borzel commented Apr 9, 2018

@gangsterrapper22 in both cases

@cocoon
Copy link
Collaborator

cocoon commented Apr 9, 2018

Can you post the new error message?

I got the error message when connecting to a real XenServer 7.2 and then switching to the performance tab.
I didn't get an error when compiling as Release|Mixed and running the .exe manually anymore.

But I got no error message from 2 "virtual" test xcp-ng servers but they only have 4 CPU and currently host no VM themself and show no performance, will try to find out more if I can.

@gangsterrapper22
Copy link
Collaborator Author

I used now the branded Version from @borzel which he has given me in Issue 7. When I try to open there the Performance Tab, then I get these Error message.

xcp-ng

@cocoon
Copy link
Collaborator

cocoon commented Apr 10, 2018

OK yes I can confirm I get this from time to time.

The error comes from here:
https://github.com/xcp-ng/xenadmin/blob/master/XenAdmin/Controls/CustomDataGraph/DataKey.cs#L117

DataSet fivesecond = ArchiveMaintainer.Archives[ArchiveInterval.FiveSecond].Sets[i];
if (!DataSourceUUIDsToShow.Contains(fivesecond.Uuid))

Sometimes "fivesecond" is null.
And sometimes index out of bounds for ArchiveMaintainer.Archives[ArchiveInterval.FiveSecond].Sets[i]

It looks like "ArchiveMaintainer.Archives[ArchiveInterval.FiveSecond].Sets" is reset and returns a count of 0 items in the middle of the loop.

A quick (expensive) workaround is to make a copy of the List and work with that, but maybe it should be solved by Citrix later if it is happening with the official Console.

 var ArchiveFiveSecond = new List<DataSet>(ArchiveMaintainer.Archives[ArchiveInterval.FiveSecond].Sets);

                for (int i = 0; i < ArchiveFiveSecond.Count; i++)
                {
                    DataSetCollectionWrapper wrapper = new DataSetCollectionWrapper();
                    DataSet fivesecond = ArchiveFiveSecond[i];

UPDATE: just installed the official Xen Center v7.4.0 and until now it did not show this error.
So I don't know what is different and why it is not happening there.

@cocoon
Copy link
Collaborator

cocoon commented Apr 10, 2018

Must be because we are using unstable code base (#12 (comment))

@gangsterrapper22
Copy link
Collaborator Author

gangsterrapper22 commented Apr 10, 2018

I have now compiled the Jura Branch with the Rebranding and I still get there the Error which I have written in mx first post, when I compile it as Debug Version. When I compile it as Release Version then everything is fine and the Graphs are also there.
bildschirmfoto 2018-04-10 um 21 20 51

@borzel
Copy link
Member

borzel commented Apr 10, 2018

@gangsterrapper22 Release shows no error because of this:

XenModel\Utils\PropertyManager.cs(52):

#if DEBUG
Debug.Assert(result != null, string.Format("{0} doesn't exist in FriendlyNames", s));
#endif

@gangsterrapper22
Copy link
Collaborator Author

I know that they will catch the error with this Line, but I think we should also fix this error. Strange is also, that it works in the Release Version if XenCenter awaits the Value of Label-performaceCPU-avg-freq.

@borzel
Copy link
Member

borzel commented Apr 10, 2018

Can someone with XenCenter 7.4 and XenServer 7.4 please check, which Labels these entries have there?

I hacked this

grafik

to geht this result

grafik

@borzel
Copy link
Member

borzel commented Apr 10, 2018

in XenModel/FriendlyNames.resx I just found

grafik

and

grafik

In my opinion someone forgot to add the friendly name for that graphing data.

@gangsterrapper22
Copy link
Collaborator Author

I also tried to add it to the Friendlynames but you I think you have to add each CPU Core to Friendlynames because XenCenter searches for this. When you only add Label-Performance.CPU-avg-freq, then this will have no effect and you get the same errors again, but your first "hack" we can use as Workarund to fix it. When you Comment out Debug, then it is just like the Release Version. :-)

@borzel
Copy link
Member

borzel commented Apr 10, 2018

Currently I'm working on a permanent fix :-)

@gangsterrapper22
Copy link
Collaborator Author

The best way is I think to add the values dynamically at runtimte to the resx files, with the amount of cores you have, but I don't know if this is possible. Good Luck to fix it. :-)

I have re-worked your code a little bit, I think this is a "cleaner" Version:
bildschirmfoto 2018-04-10 um 22 30 23

@borzel
Copy link
Member

borzel commented Apr 10, 2018

No, the resx gives you a string like this "CPU {0}" and you put later the number in.

@gangsterrapper22
Copy link
Collaborator Author

Yes, I also tried something in the past, bit has never worked. Maybe you have more luck then I had. I am off for today.

@borzel borzel removed the help wanted Extra attention is needed label Apr 10, 2018
@borzel borzel self-assigned this Apr 10, 2018
@borzel borzel added the enhancement New feature or request label Apr 10, 2018
borzel added a commit that referenced this issue Apr 10, 2018
@borzel
Copy link
Member

borzel commented Apr 10, 2018

Please try XCP-ng Console 7.4.0.2-beta: https://github.com/xcp-ng/xenadmin/releases/tag/v7.4.0.2-beta

@gangsterrapper22
Copy link
Collaborator Author

gangsterrapper22 commented Apr 10, 2018

Edit:

I have seen that the timerange is wrong, so I think it is no bug. When I change the timerange then it works. Sorry.

===============================
I tested it and the Graphs are only working for one Server correctly. On my second Server I only get the Graph where the time is. I don't know if it's a bug of XenCenter or XCP-ng or maybe on my side. Both Servers are in a Pool. Did you compile it as Debug or Release Version? Great work so far.

bug

@borzel
Copy link
Member

borzel commented Apr 10, 2018

of course compiled as release version :-)

@gangsterrapper22
Copy link
Collaborator Author

gangsterrapper22 commented Apr 10, 2018

Then it looks good so far and I think the most issues are solved for now. Then I think we can also close this case.

@borzel
Copy link
Member

borzel commented Apr 10, 2018

I'll close this, follow up is here: #16

@borzel borzel closed this as completed Apr 10, 2018
borzel added a commit that referenced this issue Apr 24, 2018
borzel added a commit that referenced this issue Apr 24, 2018
borzel added a commit that referenced this issue Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants