Expose Juju provider in an environment variable

Bug #1777156 reported by Alvaro Uria
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Undecided
Unassigned

Bug Description

On the following link, there is a list of exposed environment variables by Juju:
https://github.com/juju/juju/blob/01b24551ecdf20921cf620b844ef6c2948fcc9f8/doc/charms-in-action.txt#L94

Could the type of Juju provider be exposed?

Samples:
JUJU_PROVIDER='maas'
JUJU_PROVIDER='lxd'
JUJU_PROVIDER='openstack'
etc.

Such variable would help decide if actions such as open-port/close-port would be needed or not, since they are treated in the same way across all supported providers but they may not be needed on some of them (ie. maas, lxd).

This is a different approach from a previous issue filed at:
https://bugs.launchpad.net/juju/+bug/1741028
https://bugs.launchpad.net/juju-core/+bug/1427770

If we are able to track the provider, we won't call "open-port" in the first place.

Thank you.

Revision history for this message
Junien F (axino) wrote :

I'd rather have the charms always open-port and Juju do the right thing.

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

Charms with custom code per provider that aren't inherently provider specific (proxy for AWS services, etc), seems like a bad choice.

While it may help a particular case, it often will lead to brittle charms.

Changed in juju:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju because there has been no activity for 60 days.]

Changed in juju:
status: Incomplete → Expired
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.