Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors while deploying amulet #141

Open
Shruthima opened this issue Jul 7, 2016 · 20 comments
Open

Errors while deploying amulet #141

Shruthima opened this issue Jul 7, 2016 · 20 comments

Comments

@Shruthima
Copy link

I am facing Two issues while deploying IBM-IM charm amulet locally. Here the links for both errors: http://paste.ubuntu.com/18686777/
http://paste.ubuntu.com/18686804/

@tvansteenburgh
Copy link
Contributor

@Shruthima What's the output of juju version? Amulet (and several other tools don't work with the latest 2.0 betas. They work with beta8 and prior, but not beta9+ (yet). Also, your version of juju-deployer is slightly out-of-date - latest is 0.8.0.

@Shruthima
Copy link
Author

@tvansteenburgh Output of juju version is:
2.0-beta7-xenial-amd64

@Shruthima
Copy link
Author

Any updates on this issue ?

@tvansteenburgh
Copy link
Contributor

Did you try upgrading your version of juju-deployer as suggested?

@Shruthima
Copy link
Author

Yes i have upgraded the juju-deployer version to 0.8.0
root@c277-pkvm-vm53:~/charms/trusty/ibm-im# pip list | grep juju
juju-deployer (0.8.0)
jujubundlelib (0.4.1)
jujuclient (0.52.0)

root@c277-pkvm-vm53:~/charms/trusty/ibm-im# juju version
2.0-beta12-xenial-ppc64el

@Shruthima
Copy link
Author

Could you please suggest what can be done to resolve this isuue ?

@tvansteenburgh
Copy link
Contributor

  1. For the first error, find out what the url is, and why you're getting a proxy auth error. Are you behind a proxy? Try to curl the url manually from the same host.
  2. Try not running stuff as root, but instead as the user that installed juju.

@Shruthima
Copy link
Author

In IRC we have received some comments for this issue, below are the details:
lazyPower : "The tool merges referenced in that bug are still in flight and have not landed as best i can tell. We will certainly update bug 141 on amulet when everything has landed and is easy to install/upgrade. right now its a manual process and unless you know what you're doing can leave you in an inconsistent state."
mup: "Bug #141: Revisions created with baz 1.1 are corrupt after archive-mirror <Baz (deprecated):Won't Fix> https://launchpad.net/bugs/141"

@Shruthima
Copy link
Author

@tvansteenburgh : No it is not behind proxy we have checked.
Url is cs:ibmcharmers/trusty/ibm-im
output of curl is showing as below :
root@islrpbeixv685:
/charms/trusty/ibm-im# curl cs:~ibmcharmers/trusty/ibm-im-4
curl: (6) Could not resolve host: cs

@lazypower
Copy link
Contributor

@Shruthima - that bug posted from MUP is a false positive. I was referring to this issue, which is #141, not the launchpad referenced 141, which is unrelated to Juju and the charm ecosystem.

@Shruthima
Copy link
Author

Any updates please?

@tvansteenburgh
Copy link
Contributor

Edit /usr/local/lib/python2.7/dist-packages/deployer/charm.py and put print(store_url) on line 214(ish) to find out what url is being accessed. Then curl that url from the host.

Is the second error still happening or did it go away when you upgraded juju-deployer?

@Shruthima
Copy link
Author

Second error got resolved, after upgrading the juju deployer.

I have edited the charm.py it is printing the below URL:
https://api.jujucharms.com/charmstore/charm/~ibmcharmers/trusty/ibm-im-4

Curl output:
root@islrpbeixv685:~/charms/trusty/ibm-im# curl https://api.jujucharms.com/charmstore/charm/~ibmcharmers/trusty/ibm-im-4
{"Code":"macaroon discharge required","Message":"verification failed: no macaroon cookies in request","Info":{"Macaroon":{"caveats":[{"cid":"eyJUaGlyZFBhcnR5UHVibGljS2V5Ijoiby95T3FTTlduY01vMUdVUld1ZXovZEdSMzBUc2NtbXVJeGdqenRwb0hFWT0iLCJGaXJzdFBhcnR5UHVibGljS2V5IjoiUGRuVFlqM3FXdzZUQ0dkZXNHekdnVXo2ak9qSXV5dzRBTndUL3hTOXVDTT0iLCJOb25jZSI6IlNDSm0wTGM5SXM1dFB3elErZDRjMlg1ejJ1eWNUTnNaIiwiSWQiOiJKQVpzSkZ1YjF6NGxaUnhBNHJpSW1tdDUyZ0lxNS9xY0pqWHBOd0Q5eHFweDRpb1dYUFJEZ1RiVDUvKzZSemh0Wjl1RTJuOXh6SW82S0dlMWVwOEtacEZ1bldpT1VtaWw2ZVg5UUhHV2ZROTM5MU82eEUxMlRqOUl2OVhRT3c1Ti9oZEEzTlI3SW02WTg5WXFLM1dQVlZMZUttYWdxa0hEMUE9PSJ9","vid":"qS2BD8HrNsrzb7vy9sBFahTT4knsFmyfZrtGFVVNG1Ql63YHd30lf0h9OYYLtS-SIcF-G0x6fRFuOPRzNLYOiy3onBngKKiL","cl":"https://api.jujucharms.com/identity/v1/discharger"},{"cid":"allow read-with-terms"},{"cid":"time-before 2016-08-03T13:59:46.411957449Z"},{"cid":"is-entity cs:~ibmcharmers/trusty/ibm-im-4"},{"cid":"eyJUaGlyZFBhcnR5UHVibGljS2V5IjoiTGVVME14cU05VzNNNkN1cTZxNm5sd3ArU1c4R2hXTUpNNUtNSmY2QkxSaz0iLCJGaXJzdFBhcnR5UHVibGljS2V5IjoiUGRuVFlqM3FXdzZUQ0dkZXNHekdnVXo2ak9qSXV5dzRBTndUL3hTOXVDTT0iLCJOb25jZSI6ImpQZkVSME1ObWZid3VFNkhXMk1RSXdHSFVNSmxOcGZzIiwiSWQiOiJGc3Y2ekU0bXVaY2I3V3NVdXhQZnZaNHRYRVQ3cmZGRWJESzdQRXdKRENFb3Bhb1ZYc1RwcG42RW11R3FSYml4Q0EyTzd3amNwUmVYOTNMRXdwWUE5RWZvTDRGWW1aN0pLc3dYUEdqVWxhSjdMQnUvTHFhM3N5NGY5K2lEMTRHVCJ9","vid":"4K8_FpbCPvRWbxojRjw4LfsSOUGizvOD1s0vuJGiHeXEXDTnhCLUayLI4xlbPkIVqaiLtYYDbloRPSbdT711rR4lyzIYxKQ-","cl":"https://api.jujucharms.com/terms"}],"location":"charmstore","identifier":"0a12c2f48006ac867ca6034bf05ad828-47e988b8d3ec0ed419fa2508fd02db16","signature":"c992a7256ee5deb65bc1f8ccfe62bfdf9920eaaebc04d76ba50eb0beb79bf003"},"MacaroonPath":"../../../","CookieNameSuffix":"authz"}}

@tvansteenburgh
Copy link
Contributor

Looks like the charm isn't publicly readable. Try:

charm grant ~ibmcharmers/trusty/ibm-im everyone

@Shruthima
Copy link
Author

We are getting same error even after running charm grant command.

@tvansteenburgh
Copy link
Contributor

It looks like the charm requires terms to be accepted, is that correct? We don't have support for accepting terms in amulet yet.

@mbruzek
Copy link
Contributor

mbruzek commented Aug 4, 2016

@tvansteenburgh yes this ibm-im charm does have a term attached to it.

$ juju deploy cs:~ibmcharmers/trusty/ibm-im
ERROR Declined: please agree to the following terms ibm-im/1. Try: "juju agree ibm-im/1"

@Shruthima I wonder if we can not work around this problem to unblock you. I see from your pastebins that you are using a root user to deploy these charms. The terms feature requires a log in to the charm store for a specific user tied to an UbuntuSSO account such as launchpad. You would issue the charm login command and verify there is a json key in the ~/.go-cookie for this user. If the user has already agreed to the charm juju list-agreements the amulet test may very well work without any more intervention. Please try this and pastebin the results if not successful.

charm login
juju list-agreements
juju agree ibm-im/1
juju list-agreements
python tests/10-deploy.py

@Shruthima
Copy link
Author

@mbruzek : I have agreed the terms and deployed ibm-im from charm store in the same machine, it worked fine.
But, when we try to deploy through amulet we are facing this issue.
root@c277-pkvm-vm53:/charms/trusty/ibm-im# charm login
root@c277-pkvm-vm53:
/charms/trusty/ibm-im# juju list-agreements
[
{
"user": "salmavar",
"term": "lorem-ipsum",
"revision": 1,
"created-on": "2016-06-09T15:03:10Z"
},
{
"user": "salmavar",
"term": "ibm-im",
"revision": 1,
"created-on": "2016-07-18T05:33:07Z"
}
]
root@c277-pkvm-vm53:~/charms/trusty/ibm-im# juju agree ibm-im/1
Already agreed
Commands output:
http://paste.ubuntu.com/22181758/

@shilkaul
Copy link

shilkaul commented Aug 5, 2016

@mbruzek: I did charm login and verified that ~/.go-cookie is generated. How can we verify that it has the corresponding json key for my user id ?.

Also I had one observation not specifically related to above issue, when we manually deploy the charm from charm store as shown below:

juju deploy cs:~ibmcharmers/trusty/ibm-platform-lsf-storage-8 --series=trusty, it throws the below error message and charm is not deployed:
ERROR storing charm for URL "cs:~ibmcharmers/trusty/ibm-platform-lsf-storage-8": cannot unmarshal error response "\n\n<title>400 Bad Request</title>\n\n

Bad Request

\n

Your browser sent a request that this server could not understand.
\nSize of a request header field exceeds server limit.
\n

\nCookie\n
\n

\n
\nApache/2.4.7 (Ubuntu) Server at api.jujucharms.com Port 443\n\n": invalid character '<' looking for beginning of value

Again I deploy the same charm, then I am not presented with this error again. After accepting the terms, my charm gets deployed successfully. Not sure if this is related to the issue we are getting in amulet.

@mbruzek
Copy link
Contributor

mbruzek commented Aug 5, 2016

@shilkaul You can use juju list-agreements to see the user id. I have not tried to look at the .go-cookies file myself.

As far as that new error, I would file a new issue against the Charm Store client for that one: https://github.com/juju/charmstore-client/issues as this seems to be an issue with the charm store response to juju deploy command. Be sure to list your juju version, and give them a reproducible example so they can fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants