Bug 751834 - Hardcoded resource URL (ec2.amazonaws.com)
Summary: Hardcoded resource URL (ec2.amazonaws.com)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-ec2-enhanced-hooks
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.1.1
: ---
Assignee: Robert Rati
QA Contact: Luigi Toscano
URL:
Whiteboard:
Depends On: 761165
Blocks: 756256 765607
TreeView+ depends on / blocked
 
Reported: 2011-11-07 17:55 UTC by Luigi Toscano
Modified: 2012-02-07 10:01 UTC (History)
3 users (show)

Fixed In Version: condor-ec2-enhanced-hooks-1.3.0-1, condor-ec2-enhanced-1.3.0-1
Doc Type: Bug Fix
Doc Text:
C: EC2 Enhanced didn't allow setting a region C: Using EC2 Enhanced with AMIs in a region other than a user's default region, so the job would fail to start F: EC2 Enhanced now supports setting regions by adding 'EC2Region = "<region>"' to a job description file. R: Running jobs on amis in regions us-east-1 and eu-west-1 succeeds
Clone Of:
Environment:
Last Closed: 2012-02-06 18:17:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 751793 0 high CLOSED Document how to submit an EC2 job in a different availability zone 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 754463 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 784034 0 low CLOSED Support all the available regions for EC2/Enhanced jobs. 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2012:0100 0 normal SHIPPED_LIVE Moderate: MRG Grid security, bug fix, and enhancement update 2012-02-06 23:15:47 UTC

Internal Links: 751793 754463 784034

Description Luigi Toscano 2011-11-07 17:55:28 UTC
Description of problem:
The translation hook defines resource_url as 'https://ec2.amazonaws.com/' and the value can't be changes. In order to run AMIs defined in other regions/providers (not the default one), a different resource must be used (see rhbz751793).

Proposed change: make the value configurable.

Version-Release number of selected component (if applicable):
condor-7.6.5-0.5
condor-ec2-enhanced-hooks-1.2-4

Comment 1 Robert Rati 2011-12-08 18:21:01 UTC
You can now specify the region for ec2e by adding the following to your submit file:

+EC2Region = "eu-west-1"

Replace eu-west-1 with the region you ami is in.  You can also set the availability zone by adding to your submit file:

+EC2AvailabilityZone = "eu-west-1b"

Fixed on branch:
BZ751834-availability-zone

Comment 2 Robert Rati 2011-12-08 19:55:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: EC2 Enhanced didn't allow setting a region
C: Using EC2 Enhanced with AMIs in a region other than a user's default region, so the job would fail to start
F: EC2 Enhanced now supports setting regions by adding 'EC2Region = "<region>"' to a job description file.
R: Running jobs on amis in different regions works

Comment 4 Luigi Toscano 2012-01-18 20:08:53 UTC
The fix has a problem (RHEL5.7/RHEL6.2), JobRouterLog says:


01/18/12 20:54:21 TranslateClient::hookExited (src=13.0,route=Amazon small): Warning, hook /usr/libexec/condor/hooks/hook_translate.py (pid 12767) printed to stderr: Traceback (most recent call last):
  File "/usr/libexec/condor/hooks/hook_translate.py", line 438, in ?
    sys.exit(main())
  File "/usr/libexec/condor/hooks/hook_translate.py", line 409, in main
    r_obj = AWSRegion.get_sqs_region(region)
  File "/usr/lib/python2.4/site-packages/condorec2e/region.py", line 26, in get_sqs_region
    return region_obj
UnboundLocalError: local variable 'region_obj' referenced before assignment

Initializing region_obj before the loop is enough to make it working.

python-condorutils-1.5-4
condor-classads-7.6.5-0.12
condor-7.6.5-0.12
condor-ec2-enhanced-hooks-1.3.0-1
python-condorec2e-1.3.0-1

Comment 5 Robert Rati 2012-01-23 16:09:55 UTC
The region limitation comes from boto 1.7a, which only supports us-east-1 and
eu-west-1.

Comment 6 Robert Rati 2012-01-23 16:09:55 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1,4 @@
 C: EC2 Enhanced didn't allow setting a region
 C: Using EC2 Enhanced with AMIs in a region other than a user's default region, so the job would fail to start
 F: EC2 Enhanced now supports setting regions by adding 'EC2Region = "<region>"' to a job description file.
-R: Running jobs on amis in different regions works+R: Running jobs on amis in regions us-east-1 and eu-west-1 succeeds

Comment 7 Luigi Toscano 2012-01-23 18:24:47 UTC
It is possible to specify other regions for EC2/Enhanced jobs (albeit limited to the ones supported by boto).
Verified on RHEL5.7/6.2, i386/x86_64 (submitters).

condor-7.6.5-0.12
condor-ec2-enhanced-hooks-1.3.0-1

Comment 8 errata-xmlrpc 2012-02-06 18:17:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0100.html


Note You need to log in before you can comment on or make changes to this bug.