Cannot deploy a charm that has no peers

Bug #1313793 reported by Dave Cheney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
Low
Jimmie Butler

Bug Description

% cat ../metadata.yaml
name: juju-development
summary: A Juju development environment
maintainer: David Cheney <email address hidden>
description: |
  juju-development deploys a complete development environment for Juju.
categories:
  - misc
subordinate: false
provides:
requires:
peers:

% juju deploy --repository=$PWD/../../.. local:trusty/juju-development
WARNING unknown config field "public-bucket"
WARNING failed to load charm at "/home/dfc/src/launchpad.net/juju-core/repostory/trusty/juju-development": metadata: peers: expected map, got nothing
ERROR charm not found in "/home/dfc/src/launchpad.net/juju-core/repostory/trusty/juju-development/hooks/../../..": local:trusty/juju-development

Tags: charms

Related branches

Revision history for this message
John A Meinel (jameinel) wrote :

If you just delete the "peers:" line, I believe the charm will work fine. It is just that we don't support an empty field for peers.

It would probably be good to fix this, but I don't think it is High priority

Changed in juju-core:
status: New → Triaged
importance: Undecided → Low
tags: added: charms
Revision history for this message
Jimmie Butler (jimmiebtlr) wrote :

The approach I was taking was making the relationships not nil maps, but instead empty maps. This approach is complicated when a charm is fetched from the database, which seems to occur in multiple places in the code.

There seems two options to fix this bug.

1 Make maps not nil, but instead empty. Already have code that takes care of reading metadata file in.
  This would likely require one of these
  1. Create a standard way to get the charm back from the database that doesn't directly call the mgo bindings. This would allow the initialization of the maps.
  2. Change the data that's saved in the mongo database. I suspect this may have backward compatibility implications.

2. Change juju to not care if the map is nil. This would probably be the simplest, but it seems less consistent to me.

Could I get an outside opinion on the best route to take this?

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

No update for a long time - putting back to Triaged.

Changed in juju-core:
status: In Progress → Triaged
Changed in juju-core:
status: Triaged → Won't Fix
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.