Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Wrong return message (minor issue) #7

Closed
pemca opened this issue Sep 25, 2013 · 5 comments
Closed

Wrong return message (minor issue) #7

pemca opened this issue Sep 25, 2013 · 5 comments
Assignees

Comments

@pemca
Copy link

pemca commented Sep 25, 2013

./check_rhev3 -H khk9dsg31.ip.tdk.dk -p 443 -a admin@internal:xxxxxxxxx -R khk9dsk30.ip.tdk.dk -l network -s status
RHEV OK: Hosts ok - 6/6 Nics with state Active|nics=6;6;6;0;

It returns ‘Hosts ok’ – I would expect ‘Network ok’ or 'Nics Ok'
Thanks
Peter Calum

@ghost ghost assigned scrat14 Sep 25, 2013
scrat14 pushed a commit that referenced this issue Sep 27, 2013
@scrat14
Copy link
Member

scrat14 commented Sep 27, 2013

Documentation examples requires an update, too...

@scrat14 scrat14 closed this as completed Nov 4, 2013
@pemca
Copy link
Author

pemca commented Dec 20, 2013

Hi Rene

I have used your fine check_rhev for a while against RHEV 3.1, and it works
fine. Now i have upgraded to RHEV 3.2 and i see 2 checks not working after
some time.
They hangs against RHEV-M, and check_rhev times out. If i reboot RHEVM 3.2
it works again for 7-8 hours. Script connects but no result back. I dont
think it is your script, but a fault in RHEVM API 3.2. - I just want to
hear you, if you have experinced the same or heard about this error.

Other checks works OK.

[root@khk9dsg25 libexec]# ./check_rhev3 -H khk9dsg32.ip.tdk.dk -vvv -p 443
-a admin@internal:xxxxxxxxxx -C khk9-rhev32
[V] Starting the main script.
[V] Checking which component to monitor.
[D] check_cluster: Called function check_cluster
[V] Cluster: Checking cluster khk9-rhev32.
[V] Cluster: No check is specified, checking cluster host status.
[D] check_cluster_status: Called function check_cluster_status.
[V] Status: Checking status of hosts.
[D] check_cluster_status: Input parameter $subcheck: hosts
[D] get_result: Called function get_result.
[D] get_result: Input parameter $_[0]: /clusters?search=name%3Dkhk9-rhev32
[D] get_result: Input parameter $xml: clusters
[D] get_result: Input parameter $search: id
[D] rhev_connect: Called function rhev_connect.
[V] REST-API: Connecting to REST-API.
[D] rhev_connect: Input parameter: /clusters?search=name%3Dkhk9-rhev32.
[V] REST-API: RHEVM-API URL:
https://khk9dsg32.ip.tdk.dk:443/api/clusters?search=name%3Dkhk9-rhev32
[V] REST-API: RHEVM-API User: admin@internal
[V] REST-API: RHEVM-API Password: Hello2Test
[V] REST-API: cookie filename:
a2hrOWRzZzMyLmlwLnRkay5kay1hZG1pbkBpbnRlcm5hbAo=
[D] rhev_connect: Trying cookie authentication.
[D] rhev_connect: No cookie file found - using username and password
[D] rest_api_connect: Called function rest_api_connect.
[V] REST-API: Connecting to REST-API.
[D] rest_api_connect: Input parameter: HTTP::Request=HASH(0x14e5570).
[D] rest_api_connect: Input parameter: LWP::UserAgent=HASH(0x14dd128).
[D] rest_api_connect: Input parameter:
/var/tmp/a2hrOWRzZzMyLmlwLnRkay5kay1hZG1pbkBpbnRlcm5hbAo=.
[V] REST-API: Cache-Control: no-cache
Connection: close
Date: Fri, 20 Dec 2013 20:27:18 GMT
Pragma: No-cache
Vary: Accept-Encoding
Content-Length: 1283
Content-Type: application/xml
Expires: Thu, 01 Jan 1970 01:00:00 CET
Client-Date: Fri, 20 Dec 2013 20:27:19 GMT
Client-Peer: 188.181.135.220:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=ip.tdk.dk/CN=CA-khk9dsg32.ip.tdk.dk.90021
Client-SSL-Cert-Subject: /C=US/O=ip.tdk.dk/CN=khk9dsg32.ip.tdk.dk
Client-SSL-Cipher: DHE-RSA-AES256-SHA
Client-SSL-Warning: Peer certificate not verified
JSESSIONID: F+BYLlpBUUa6X9modCQ98eEk
Set-Cookie: JSESSIONID=F+BYLlpBUUa6X9modCQ98eEk; Path=/api; Secure
[D] rest_api_connect:


khk9-rhev32
khk9 test server cluster




<data_center
href="/api/datacenters/5849b030-626e-47cb-ad90-3ce782d831b3"
id="5849b030-626e-47cb-ad90-3ce782d831b3"/>
<memory_policy>

<transparent_hugepages>
true
</transparent_hugepages>
</memory_policy>
<scheduling_policy/>

<error_handling>
<on_error>migrate</on_error>
</error_handling>
<virt_service>true</virt_service>
<gluster_service>false</gluster_service>
<threads_as_cores>true</threads_as_cores>


[V] REST_API: jsessionid: JSESSIONID=F+BYLlpBUUa6X9modCQ98eEk
[D] rest_api_connect: Creating new cookie file
/var/tmp/a2hrOWRzZzMyLmlwLnRkay5kay1hZG1pbkBpbnRlcm5hbAo=.
[D] get_result: %result: $VAR1 = 'cluster';
$VAR2 = {
'link' => [
{
'rel' => 'networks',
'href' =>
'/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks'
},
{
'rel' => 'permissions',
'href' =>
'/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/permissions'
},
{
'rel' => 'glustervolumes',
'href' =>
'/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes'
}
],
'cpu' => {
'id' => 'Intel Nehalem Family'
},
'version' => {
'minor' => '2',
'major' => '3'
},
'virt_service' => 'true',
'scheduling_policy' => {},
'name' => 'khk9-rhev32',
'threads_as_cores' => 'true',
'data_center' => {
'href' =>
'/api/datacenters/5849b030-626e-47cb-ad90-3ce782d831b3',
'id' => '5849b030-626e-47cb-ad90-3ce782d831b3'
},
'description' => 'khk9 test server cluster',
'gluster_service' => 'false',
'href' => '/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95',
'id' => '99408929-82cf-4dc7-a532-9d998063fa95',
'memory_policy' => {
'transparent_hugepages' => {
'enabled' => 'true'
},
'overcommit' => {
'percent' => '150'
}
},
'error_handling' => {
'on_error' => 'migrate'
}
};
[D] get_result: Looping through %result.
khk9-rhev32: 99408929-82cf-4dc7-a532-9d998063fa95
[D] check_cluster_status: %id: $VAR1 = 'khk9-rhev32';
$VAR2 = '99408929-82cf-4dc7-a532-9d998063fa95';
[D] check_cluster_status: Looping through %id
[D] check_status: Called function check_status.
[V] Status: Checking status of hosts.
[D] check_status: Input parameter $components: hosts
[D] check_status: Input parameter $search:
[D] check_status: Input parameter $id: 99408929-82cf-4dc7-a532-9d998063fa95
[D] check_status: Input parameter $searchid: cluster
[D] check_status: Converting variables.
[D] check_status: Converted variable $components: hosts
[D] check_status: Converted variable $component: host
[D] rhev_connect: Called function rhev_connect.
[V] REST-API: Connecting to REST-API.
[D] rhev_connect: Input parameter: /hosts/.
[V] REST-API: RHEVM-API URL: https://khk9dsg32.ip.tdk.dk:443/api/hosts/
[V] REST-API: RHEVM-API User: admin@internal
[V] REST-API: RHEVM-API Password: XXXXXXXXXXXX
[V] REST-API: cookie filename:
a2hrOWRzZzMyLmlwLnRkay5kay1hZG1pbkBpbnRlcm5hbAo=
[D] rhev_connect: Trying cookie authentication.
[D] rhev_connect: Using cookie: JSESSIONID=F+BYLlpBUUa6X9modCQ98eEk
[V] REST-API: Cookie authentication failed - using username and password.
[D] rest_api_connect: Called function rest_api_connect.
[V] REST-API: Connecting to REST-API.
[D] rest_api_connect: Input parameter: HTTP::Request=HASH(0x17be730).
[D] rest_api_connect: Input parameter: LWP::UserAgent=HASH(0x17be6b8).
[D] rest_api_connect: Input parameter:
/var/tmp/a2hrOWRzZzMyLmlwLnRkay5kay1hZG1pbkBpbnRlcm5hbAo=.
RHEV UNKNOWN: Failed to connect to RHEVM-API or received invalid response.
[D] rhev_connect: Deleting file
/var/tmp/a2hrOWRzZzMyLmlwLnRkay5kay1hZG1pbkBpbnRlcm5hbAo=
[root@khk9dsg25 libexec]#

Best regards and a merry christmas to you and your family.

Peter Calum,
Denmark

2013/11/4 René Koch notifications@github.com

Closed #7 #7.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.

Venlig hilsen / Kind regards

Peter Calum

@scrat14
Copy link
Member

scrat14 commented Dec 23, 2013

Hi Peter,

did the RHEV upgrade you mentioned in #12 also solve this issue?
According to your posted output RHEV refuses the cookie it did sent during the first connect, so this could be a bug with RHEV REST-API...

Regards and merry christmas,
René

@pemca
Copy link
Author

pemca commented Dec 24, 2013

Hi René

Yes, the upgrade solved the problem on RHEV 3.2. But i have'nt tested it
on 3,3.
Please reply if you want me to send a new debug trace from the script on
3.2.

Merry Christmas to you and your family,

Peter

2013/12/23 René Koch notifications@github.com

Hi Peter,

did the RHEV upgrade you mentioned in #12https://github.com/ovido/check_rhev3/issues/12also solve this issue?
According to your posted output RHEV refuses the cookie it did sent during
the first connect, so this could be a bug with RHEV REST-API...

Regards and merry christmas,
René


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-31142703
.

Venlig hilsen / Kind regards

Peter Calum

@scrat14
Copy link
Member

scrat14 commented Dec 25, 2013

Thanks a lot for the information.
I don't see a reason why it shouldn't work on RHEV 3.3 (beta) as well as check_rhev3 is working fine with oVirt 3.3, which is the base for RHEV.
I don't need a new debug output at the momen - thanks!

Regards,
René

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants