Core dump if using /guest/XXX/info without authorization

Bug #1809266 reported by Herald ten Dam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zVM Cloud Connector
Triaged
Medium
peter.zw

Bug Description

I made a guest for Linux named slb27. I get information from the api with /guests/slb27. After that I did /guests/slb27/info and it gave me errors. Executing the command with smcli it gives me a Core Dump.

After some investigation I discoverd I forgot the autorisation on the SMAPI site for Image_performance_query. After given the autorisation the call to /guests/slb27/info worked.

So it seems that not having autorisation gives an ugly message back and even core dump on Linux.

I'm using version 1.3

description: updated
Revision history for this message
jichenjc (jichenjc) wrote :

ok, so I think the question here is when some API not authorized ,we should report some useful info instead of core dump or weird error

can you paste the error you saw at beginning?

Huang Rui (bjhuangr)
Changed in python-zvm-sdk:
assignee: nobody → zzwfree (zzwfree)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Herald ten Dam (damsteen) wrote :

I run this in the browser and get the next message:
{"rs": 0, "overallRC": 500, "modID": 1, "rc": 301, "output": "", "errmsg": "Unexpected internal error in ZVM SDK, error: SMUT internal error. Results: {'rs': 0, 'errno': 0, 'strError': '', 'overallRC': 25, 'rc': 301, 'response': ['(Error) ULTVMU0301E SMAPI API failed: Image_Performance_Query, response header does not have the expected 3 values before the (details) string. cmd: sudo /opt/zthin/bin/smcli Image_Performance_Query --addRCheader -T CLDCONO1 -T SLB27 -c 1, response header: , out: ']}"}

Running the command on the Linux Server I get:
cldcono1:~ # smcli Image_Performance_Query --addRCheader -T CLDCONO1 -T SLB27 -c 1
Segmentation fault (core dumped)
cldcono1:~ #

So I think because of the core dump it is not the right answer.

With authorization I get the right answer in the browser:
{"rs": 0, "overallRC": 0, "modID": null, "rc": 0, "output": {"max_mem_kb": 1048576, "num_cpu": 1, "cpu_time_us": 891, "power_state": "on", "mem_kb": 8}, "errmsg": ""}

Revision history for this message
Herald ten Dam (damsteen) wrote :

If I choose for example /guest/slb27 and give no authorization, it comes back with no authorization:
{"rs": 16, "overallRC": 8, "modID": 1, "rc": 100, "output": "", "errmsg": "SMUT error: SMUT request failed. RequestData: 'getvm SLB27 directory', Results: '{'rs': 16, 'errno': 0, 'strError': u'ULGSMC5100E Request not authorized by server', 'overallRC': 8, 'rc': 100, 'response': [u'(Error) ULTVMU0300E SMAPI API failed: Image_Query_DM, overall rc: 8, rc: 100, rs: 16, errno: 0, cmd: sudo /opt/zthin/bin/smcli Image_Query_DM --addRCheader -T SLB27, out: API issued : Image_Query_DM', u'Failed', u' Return Code: 100', u' Reason Code: 16', u' Description: ULGSMC5100E Request not authorized by server', u' API issued : Image_Query_DM']}'"}

So that is good. So the problem is the core dump.

Revision history for this message
jichenjc (jichenjc) wrote :

Ok, I believe smcli need some toleration on the error message, we will recreate the problem and try to fix it

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.