<html><body><p>Hi Ryan,<br>     There is a bug opened with a similar failure symptom, although I am not sure if the cause is the same:<br><a href="https://bugs.launchpad.net/magnum/+bug/1481889">https://bugs.launchpad.net/magnum/+bug/1481889</a><br><br>Trying to use kubectl to deploy the V1 manifest, I get this error message: <br><font color="#FF0000">Error: unable to recognize "redis-master.yaml": no object named "Pod" is registered</font><br><br>Clearly the error handling from the k8s handler needs to be improved.  If the bug above is different from what you found, I think opening a new bug would be best.<br><br>Ton Ngo,<br><br><br><img width="16" height="16" src="cid:1__=07BBF450DFB376758f9e8a93df938690918c07B@" border="0" alt="Inactive hide details for Adrian Otto ---09/14/2015 05:34:33 PM---Ryan, Thanks for sharing this. Sorry you got out to a bumpy s"><font color="#424282">Adrian Otto ---09/14/2015 05:34:33 PM---Ryan, Thanks for sharing this. Sorry you got out to a bumpy start. I suggest you do file a bug for t</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">Adrian Otto <adrian.otto@rackspace.com></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">"OpenStack Development Mailing List (not for usage questions)" <openstack-dev@lists.openstack.org></font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">09/14/2015 05:34 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: [openstack-dev] [Magnum] API response on k8s failure</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt>Ryan,<br><br>Thanks for sharing this. Sorry you got out to a bumpy start. I suggest you do file a bug for this against magnum and we can decide how best to handle it. I can not tell from your email what the kubectl would do with the same input. We might have an opportunity to make both better.<br><br>If you need guidance for how to file a bug, feel free to email me directly and I can point you in the right direction.<br><br>Thanks,<br><br>Adrian<br><br>> On Sep 14, 2015, at 3:05 PM, Ryan Rossiter <rlrossit@linux.vnet.ibm.com> wrote:<br>> <br>> I was giving a devstacked version of Magnum a try last week, and from a new user standpoint, I hit a big roadblock that caused me a lot of confusion. Here's my story:<br>> <br>> I was attempting to create a pod in a k8s bay, and I provided it with an sample manifest from the Kubernetes repo. The Magnum API then returned the following error to me:<br>> <br>> ERROR: 'NoneType' object has no attribute 'host' (HTTP 500)<br>> <br>> I hunted down the error to be occurring here [1]. The k8s_api call was going bad, but conductor was continuing on anyways thinking the k8s API call went fine. I dug through the API calls to find the true cause of the error:<br>> <br>> {u'status': u'Failure', u'kind': u'Status', u'code': 400, u'apiVersion': u'v1beta3', u'reason': u'BadRequest', u'message': u'Pod in version v1 cannot be handled as a Pod: no kind "Pod" is registered for version "v1"', u'metadata': {}}<br>> <br>> It turned out the error was because the manifest I was using had apiVersion v1, not v1beta3. That was very unclear by Magnum originally sending the 500.<br>> <br>> This all does occur within a try, but the k8s API isn't throwing any sort of exception that can be caught by [2]. Was this caused by a regression in the k8s client? It looks like the original intention of this was to catch something going wrong in k8s, and then forward on the message & error code on to let the magnum API return that.<br>> <br>> My question here is: does this classify as a bug? This happens in more places than just the pod create. It's changing around API returns (quite a few of them), and I don't know how that is handled in the Magnum project. If we want to have this done as a blueprint, I can open that up and target it for Mitaka, and get to work. If it should be opened up as a bug, I can also do that and start work on it ASAP.<br>> <br>> [1] </tt><tt><a href="https://github.com/openstack/magnum/blob/master/magnum/conductor/handlers/k8s_conductor.py#L88-L108">https://github.com/openstack/magnum/blob/master/magnum/conductor/handlers/k8s_conductor.py#L88-L108</a></tt><tt><br>> [2] </tt><tt><a href="https://github.com/openstack/magnum/blob/master/magnum/conductor/handlers/k8s_conductor.py#L94">https://github.com/openstack/magnum/blob/master/magnum/conductor/handlers/k8s_conductor.py#L94</a></tt><tt><br>> <br>> -- <br>> Thanks,<br>> <br>> Ryan Rossiter (rlrossit)<br>> <br>> <br>> __________________________________________________________________________<br>> OpenStack Development Mailing List (not for usage questions)<br>> Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br>> </tt><tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></tt><tt><br><br>__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br></tt><tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></tt><tt><br><br></tt><br><BR>
</body></html>