Ask Your Question
0

ValueError: No JSON object could be decoded in TripleO Stein

asked 2019-07-03 09:53:04 -0500

BiG_NoBoDy gravatar image

updated 2019-07-04 06:04:39 -0500

Hi, I cannot import hosts to TripleO, even I can access iDRAC and PXE boot Physical host.

here is output of host.yaml:

$ cat setup/hosts.yaml 
nodes:
  - mac: 
      - "zz:zz:zz:zz:zz:zz"
    name: "host6"
    cpu: 2
    memory: 4096
    disk: 40
    arch: "x86_64"
    pm_type: "idrac"
    pm_user: "root"
    pm_password: "bang"
    pm_addr: "1.1.1.6"
 (undercloud) [stack@hostname ~]$ openstack overcloud node import setup/hosts.yaml 
Waiting for messages on queue 'tripleo' with no timeout.
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_node.py", line 286, in take_action
    instance_boot_option=parsed_args.instance_boot_option
  File "/usr/lib/python2.7/site-packages/tripleoclient/workflows/baremetal.py", line 69, in register_or_update
    for payload in base.wait_for_messages(workflow_client, ws, execution):
  File "/usr/lib/python2.7/site-packages/tripleoclient/workflows/base.py", line 61, in wait_for_messages
    for payload in websocket.wait_for_messages(timeout=timeout):
  File "/usr/lib/python2.7/site-packages/tripleoclient/plugin.py", line 153, in wait_for_messages
    message = self.recv()
  File "/usr/lib/python2.7/site-packages/tripleoclient/plugin.py", line 131, in recv
    return json.loads(self._ws.recv())
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
No JSON object could be decoded
(undercloud) [stack@hostname ~]$ 
When I run it with debug: it stuck at:
HTTP POST https://undercloud_public_host:13989/v2/executions 201
Started Mistral Workflow tripleo.baremetal.v1.register_or_update. Execution ID: 41dbd4e4-899c-4e54-ba57-14ed388700ea
Waiting for messages on queue 'tripleo' with no timeout.

I am using repos: rdo-trunk-stein-tested and centos-openstack-stein

good, have found something in firewall logs on undercloud consol:

[21172.286703] IN=br-ctlplane OUT= MAC=52:54:00:54:e5:f8:40:a6:77:7f:26:20:08:00 SRC=1.1.1.6 DST=undercloud_public_host LEN=60 TOS=0x00 PREC=0x00 TTL=58 ID=32271 DF PROTO=TCP SPT=45702 DPT=5989 WINDOW=29200 RES=0x00 SYN URGP=0

but after removal drop rule, there is no firewall dropping in the network, but still no tcpdump visible packets... Even TCPDump should spot packet hitting kernel. Or it goes to one of containers?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-08-02 02:07:39 -0500

BiG_NoBoDy gravatar image

updated 2019-08-02 02:08:08 -0500

As wrote @EliadCohen I have used JSON file aswell, BUT additionally, I had to turn off validate in undercloud.conf

{
    "nodes": [
        {
            "name": "human_understandable_name",
            "pm_type": "idrac",
            "cpu": "2",
            "memory": "4096",
            "disk": "40",
            "arch": "x86_64",
            "pm_user": "root",
            "pm_password": "pass",
            "pm_addr": "10.1.2.6",
            "ports": [
                {
                    "address": "AA:BB:CC:DD:EE:FF",
                    "physical_network": "ctlplane"
                }
            ],
            "_comment": "Room 1 - Rack A - Unit 22/24"
        },
        {
            "name": "human_understandable_name",
            "pm_type": "idrac",
            "cpu": "2",
            "memory": "4096",
            "disk": "40",
            "arch": "x86_64",
            "pm_user": "root",
            "pm_password": "pass",
            "pm_addr": "10.1.2.7",
            "ports": [
                {
                    "address": "AA:BB:CC:DD:EE:FF",
                    "physical_network": "ctlplane"
                }
            ],
            "_comment": "Room 1 - Rack A - Unit 22/24"
        }
    ]
}

I have noticed, that validation workflows/tasks were running for 1 hour and around 15 min, then killed by timeout and were started every hour... Once I have removed all in undercloud.conf (one line validation=false) it all works now.

edit flag offensive delete link more
0

answered 2019-07-05 07:58:57 -0500

EliadCohen gravatar image

Hi, I haven't used a yaml to introspect before, JSONs worked fine for me. Could this be the issue?

edit flag offensive delete link more

Comments

Hi, I used json also, maybe you could share how your jason structure for one node looks like? I find different ways here, port/mac usage. and grouping. some docs say to provide network on which that MAC/port should be created, some not.

BiG_NoBoDy gravatar imageBiG_NoBoDy ( 2019-07-09 09:45:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-07-03 09:53:04 -0500

Seen: 141 times

Last updated: Aug 02