multiple tags fail to be parsed

Bug #1478789 reported by Nobuto Murata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-deployer
Fix Released
High
Edward Hope-Morley

Bug Description

With the part below in deployment.yaml
====
        nodes:
            - name: machine1
              tags: foo, bar
              architecture: amd64/generic
====

I've got an error below. Comma separated multiple tags fail to be parsed.

2015-07-28 06:11:43,532 DEBUG (execc) Executing: 'ssh -i /home/nobuto/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet ubuntu@10.230.123.52 maas maas tags new name=foo, bar' stdin=None
2015-07-28 06:11:44,654 ERROR (_maas_execute) Command 'ssh -i /home/nobuto/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet ubuntu@10.230.123.52 maas maas tags new name=foo, bar' failed: rc='1' output='u'bar' is not a name=value or name@=filename pair
'

Tags: cpec

Related branches

Revision history for this message
Edward Hope-Morley (hopem) wrote :

It looks like you should be using YAML list notation e.g.:

nodes:
  - name: machine1
     tags:
       - foo
       - bar
     architecture: amd64/generic

Revision history for this message
Edward Hope-Morley (hopem) wrote :

...but maybe parsing "foo, bar" would be better

Revision history for this message
Nobuto Murata (nobuto) wrote :

With YAML list, I've got another error:

2015-07-28 07:27:16,281 DEBUG Creating tags...
2015-07-28 07:27:16,281 DEBUG Executing: 'ssh -i /home/nobuto/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet ubuntu@10.230.123.52 maas maas tags list' stdin=None
2015-07-28 07:27:17,366 DEBUG Command executed successfully: stdout='[]'
2015-07-28 07:27:17,367 ERROR MAAS deployment failed.
Traceback (most recent call last):
  File "./maas_deployer.py", line 86, in <module>
    engine.deploy(target)
  File "/home/nobuto/maas-deployer/vmaas/engine.py", line 68, in deploy
    self.configure_maas(maas_config)
  File "/home/nobuto/maas-deployer/vmaas/engine.py", line 291, in configure_maas
    to_create = set(tags) - set([t.name for t in existing_tags])
TypeError: unhashable type: 'list'
Traceback (most recent call last):
  File "./maas_deployer.py", line 86, in <module>
    engine.deploy(target)
  File "/home/nobuto/maas-deployer/vmaas/engine.py", line 68, in deploy
    self.configure_maas(maas_config)
  File "/home/nobuto/maas-deployer/vmaas/engine.py", line 291, in configure_maas
    to_create = set(tags) - set([t.name for t in existing_tags])
TypeError: unhashable type: 'list'

Changed in maas-deployer:
status: New → Confirmed
importance: Undecided → High
Nobuto Murata (nobuto)
tags: added: cpec
Changed in maas-deployer:
milestone: none → 0.0.2
Changed in maas-deployer:
assignee: nobody → Edward Hope-Morley (hopem)
status: Confirmed → In Progress
Changed in maas-deployer:
status: In Progress → Fix Committed
Changed in maas-deployer:
status: Fix Committed → Fix Released
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.