#1017 Stop hardcoding AMIs for us-east-2 and eu-west-3
Merged 3 years ago by bcotton. Opened 4 years ago by dustymabe.
dustymabe/fedora-websites dusty  into  master

@@ -90,14 +90,6 @@ 

                      region = upload['destination']

                      results[name][region] = ami

  

-     # Hardcode AMIs for regions eu-west-3 and us-east-2 for F28 cloud-base

-     # This is because fedmsg topic 'org.fedoraproject.prod.fedimg.image.upload'

-     # doesn't have AMI information for these two regions.

-     results['HVM_base_AMI']['us-east-2'] = 'ami-00b43acad6bfbc73a'

-     results['HVM_base_AMI']['eu-west-3'] = 'ami-04abc80987c29d6fb'

fedimg still fails to copy AMI in eu-west-3 region, we will still have to hardcode for eu-west-3 region

-     results['GP2_HVM_base_AMI']['us-east-2'] = 'ami-08d6e766d9302926c'

-     results['GP2_HVM_base_AMI']['eu-west-3'] = 'ami-0e37bf70f74c79410'

- 

      shelf['timestamp'] = datetime.utcnow()

      shelf['collected'] = results

      shelf.close()

file modified
+2 -1
@@ -336,7 +336,8 @@ 

      region(u'EU West (Ireland)',               u'Ireland',      u'eu-west-1'),

      region(u'EU Central (Frankfurt)',          u'Frankfurt',    u'eu-central-1'),

      region(u'EU West (London)',                u'London',       u'eu-west-2'),

-     region(u'EU West (Paris)',                 u'Paris',        u'eu-west-3'),

+ # fedimg fails to upload to eu-west-3 for now

+ #   region(u'EU West (Paris)',                 u'Paris',        u'eu-west-3'),

nit: indentation

      region(u'Asia Pacific SE (Singapore)',     u'Singapore',    u'ap-southeast-1'),

      region(u'Asia Pacific NE (Tokyo)',         u'Tokyo',        u'ap-northeast-1'),

      region(u'Asia Pacific SE (Sydney)',        u'Sydney',       u'ap-southeast-2'),

file modified
+5 -4
@@ -89,15 +89,15 @@ 

  

  def get_messages(target):

      """ Filter the messages on target. """

-     check_permissions(filename=cache_file)

-     try:

+     if os.path.isfile(cache_file):

+         check_permissions(filename=cache_file)

          with open(cache_file, 'r') as cf:

              check_permissions(fd=cf.fileno())

              cache = json.load(cf)

              cachetime = datetime.strptime(cache['timestamp'], dateformat)

              if cachetime > (datetime.utcnow() - timedelta(days=1)):

                  return filter_messages(cache['messages'], target)

-     except FileNotFoundError:

+     else:

          log.info('No cache, loading from scratch')

  

      messages = list(retrieve_messages())
@@ -139,10 +139,11 @@ 

  

  

  def mocked_fedimg(templates):

+     # eu-west-3 is left out because fedimg fails to upload there for now

      regions = ['us-east-1', 'ap-northeast-1', 'sa-east-1', 'ap-southeast-1',

                 'ap-southeast-2', 'us-west-2', 'us-west-1', 'eu-central-1',

                 'eu-west-1', 'ap-northeast-2', 'ap-south-1', 'ca-central-1',

-                'eu-west-2', 'us-east-2', 'eu-west-3']

+                'eu-west-2', 'us-east-2']

      mockdata = {}

      for region in regions:

          mockdata[region] = 'ami-mocked'

@sinnykumari - could you check to see if you agree that this will fix https://pagure.io/releng/issue/9196

fedimg still fails to copy AMI in eu-west-3 region, we will still have to hardcode for eu-west-3 region

fedimg still fails to copy AMI in eu-west-3 region, we will still have to hardcode for eu-west-3 region

do we also need to manually upload to that region?

fedimg still fails to copy AMI in eu-west-3 region, we will still have to hardcode for eu-west-3 region

do we also need to manually upload to that region?

Yes, we do it only when Fedora goes GA for next release and we update AMI ID here.

do you know how? I wonder if we should just nix it and not worry about eu-west-3 if we're going to have to manually do it.

WDYT?

do you know how?

We create a infra ticket and request to copy AMis to missing region.

I wonder if we should just nix it and not worry about eu-west-3 if we're going to have to manually do it.
WDYT?

Yes we can considering we don't have people using cloud-base image in this region. Do we have any sort of data on this?

Also, I thought eventually we would be moving to using plume for cloud-base image.

Yes we can considering we don't have people using cloud-base image in this region. Do we have any sort of data on this?

Not that I know of :(

Also, I thought eventually we would be moving to using plume for cloud-base image.

Yeah, that's the plan. Nobody working on it though.

rebased onto fdb7d66

3 years ago

ok I updated this PR @codeblock @sinnykumari - can you review ?

small nitpick , otherwise lgtm

Metadata Update from @bcotton:
- Request assigned

3 years ago

Metadata Update from @bcotton:
- Pull-request tagged with: alt.fp.o

3 years ago

Pull-Request has been merged by bcotton

3 years ago