Go back to disallowing internet access in fake-juju.

Bug #1639276 reported by Eric Snow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fake Juju
Triaged
Medium
Unassigned

Bug Description

Some functionality in Juju (as exposed by fake-juju) requires internet access. The most significant case for fake-juju is downloading charms from the charm store. However, JujuConnSuite (the basis for fake-juju's daemon) disables internet access. As a short term fix to this conflict, we've reversed that restriction. However, the problem should be solved in some other way and then the restriction should be put back in place.

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

One notable characteristic of Juju is that it does not try to download a charm if the charm is already in the controller's database. This presents several options for avoiding download attempts:

* Use the API's "upload charm" HTTP endpoint (POST on
  /model/<UUID>/charms). [1] See:
    - apiserver/charms.go
    - apiserver/client/client.go
    - apiserver/application/charmstore.go
    - api/client.go
  This could be accomplished (with some auth complexity) using:
    - txjuju
    - python-jujuclient,
    - manually with httplib
* add the service with a "local" charm schema and then forcibly
  change the charm's schema to "cs" in the DB

Other possible solutions:
* use a fake charm store API
* add an "upload-charm" command to fake-juju that forces a
  charm into the DB

[1] This requires disabling the prohibition against uploading
    charmstore charms found in apiserver/charms.go. Currently
    this already done in fake-juju.

Changed in fake-juju:
importance: Undecided → Medium
status: New → Triaged
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.