landscape handler doesn't set tags line correctly with only one tag

Bug #1042764 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Low
Scott Moser

Bug Description

If you have only one tag set in cloud-init, like this:

landscape:
  client:
    url: "https://staging.landscape.canonical.com/message-system"
    ping_url: "http://staging.landscape.canonical.com/ping"
    account_name: "andreas"
    computer_title: "cloud-instance"
    include_manager_plugins: "ScriptExecution"
    script_users: "ALL"
    tags: [ cloud ]

The client config file gets generated like this:
[client]
url = https://staging.landscape.canonical.com/message-system
ping_url = http://staging.landscape.canonical.com/ping
data_path = /var/lib/landscape/client
script_users = ALL
include_manager_plugins = ScriptExecution
tags = cloud, <-----
computer_title = cloud-instance
account_name = andreas

That extra comma at the end of "cloud" breaks this feature and the registration request on the server ends up having no tags at all.

Related branches

Revision history for this message
Scott Moser (smoser) wrote :

The easy work around is just to make 'tags' a string in the input, right?
If that works, I think i'd prefer just documenting that rather than explicitly handling single item strings.

Changed in cloud-init:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Yes, that works, just document that it's comma-separated.

Revision history for this message
Scott Moser (smoser) wrote :

Marking fix-committed with revno 658.

Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
status: Incomplete → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
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.