azure provider handles 307 poorly

Bug #1269835 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins
1.16
Fix Released
Critical
Ian Booth
juju-core (Ubuntu)
Fix Released
Undecided
Unassigned
Saucy
Won't Fix
High
Unassigned

Bug Description

[Impact]
Users unable to use Azure cloud due to introduction of redirects in API

[Test Case]
juju bootstrap -e test-cloud-azure
#fails

[Regression Potential]
Update to gwacl library; minimal regression potential.

[Original bug report]
A recent azure test failed with "2014-01-16 01:46:29 ERROR juju supercommand.go:282 cannot start bootstrap instance: POST request failed (307: Temporary Redirect)
Command '('juju', '--show-log', 'bootstrap', '-e', 'test-cloud-azure', '--constraints', 'mem=2G')' returned non-zero exit status 1"

Given that this is a temporary redirect, perhaps it should be retried. Or perhaps a clearer error should be given to the user.

Also, subsequent bootstrap attempts fail with "Environment is already bootstrapped". If it really did fail to bootstrap, it should not report "Environment is already bootstrapped".

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote :
Aaron Bentley (abentley)
summary: - aws provider handles 307 poorly
+ azure provider handles 307 poorly
tags: added: azure-provider
removed: ec2-provider
Aaron Bentley (abentley)
description: updated
Revision history for this message
Curtis Hovey (sinzui) wrote :

This looks like a regression in gwacl or an Azure API change that gwacl does not handle. See bug 1195445.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I believe this is a symptom of the affinity problem. Azure too some of the resources down and issued a redirect to the resources still available. but Juju doesn't setup affinity machines as HA and assign affinity groups, so the redirect is essentially empty. Juju fails.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

This is indeed a regression. The bug cited above was fixed in an older version of gwacl that still used curl.
Copy and paste of my findings from lp:1274776:

I've been looking into the redirects. There's a couple of problems:
 - 307 does not incur following of the redirect in the client for requests other than GET and HEAD. This is in accordance to the spec. It's not clear to me whether in Azure we should automatically follow them or not, but it seems that's what is expected.
 - When a GET or HEAD *does* follow redirects, the followup requests drop all of the headers from the original request. This is why we often see MissingOrIncorrectVersionHeader errors from Azure.

Changed in juju-core:
importance: Low → High
assignee: nobody → Andrew Wilkins (axwalk)
milestone: none → 1.18.0
status: Triaged → In Progress
Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.18.0 → 1.17.3
Curtis Hovey (sinzui)
description: updated
James Page (james-page)
Changed in juju-core (Ubuntu):
status: New → Fix Released
Changed in juju-core (Ubuntu Saucy):
status: New → Triaged
importance: Undecided → High
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
James Page (james-page)
description: updated
Revision history for this message
Rolf Leggewie (r0lf) wrote :

saucy has seen the end of its life and is no longer receiving any updates. Marking the saucy task for this ticket as "Won't Fix".

Changed in juju-core (Ubuntu Saucy):
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

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.