sous-chefs / aws

Development repository for the aws cookbook
https://supermarket.chef.io/cookbooks/aws
Apache License 2.0
612 stars 554 forks source link

fix(ebs): update the ec2 gem and correct array membership test #425

Closed chrisminton closed 3 years ago

chrisminton commented 3 years ago

Description

Issues Resolved

Fixes Ruby errors with the latest addtions to gp3/io2 EBS volume types

Check List

chrisminton commented 3 years ago

Apologies this fixes the earlier PR errors. Fully tested:

         * aws_ebs_volume[ssd_ebs_gp3_volume] action create
           - create a 1GB volume in eu-west-1 and update the node data with created volume's id
         * aws_ebs_volume[ssd_ebs_gp3_volume] action attach
           * ohai[Reload Ohai data for volume change] action reload/opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: already initialized constant MAC_MATCH
       /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: previous definition of MAC_MATCH was here
       [2020-12-08T22:43:45+00:00] ERROR: shard_seed: Failed to get dmi property serial_number: is dmidecode installed?

             - re-run ohai and merge results into node attributes
           - attach the volume vol-0fa4d767360e8acec to instance i-05a667beadfac5a0a as /dev/sdl and update the node data with created volume's id
           * ohai[Reload Ohai data for volume change] action nothing (skipped due to action :nothing)

         * aws_ebs_volume[ssd_ebs_volume] action detach
           * ohai[Reload Ohai data for volume change] action reload/opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: already initialized constant MAC_MATCH
       /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: previous definition of MAC_MATCH was here
       [2020-12-08T22:43:53+00:00] ERROR: shard_seed: Failed to get dmi property serial_number: is dmidecode installed?

             - re-run ohai and merge results into node attributes
           - detach volume with id: vol-05068fe3c538cb397
           * ohai[Reload Ohai data for volume change] action nothing (skipped due to action :nothing)

         * aws_ebs_volume[ssd_ebs_volume] action delete
           - delete volume with id: vol-05068fe3c538cb397
         * aws_ebs_volume[standard_ebs_vol] action detach
           * ohai[Reload Ohai data for volume change] action reload/opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: already initialized constant MAC_MATCH
       /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: previous definition of MAC_MATCH was here
       [2020-12-08T22:44:04+00:00] ERROR: shard_seed: Failed to get dmi property serial_number: is dmidecode installed?

             - re-run ohai and merge results into node attributes
           - detach volume with id: vol-0c45e393786ef1a26
           * ohai[Reload Ohai data for volume change] action nothing (skipped due to action :nothing)

         * aws_ebs_volume[standard_ebs_vol] action delete
           - delete volume with id: vol-0c45e393786ef1a26
         * aws_ebs_volume[ssd_ebs_gp3_volume] action detach
           * ohai[Reload Ohai data for volume change] action reload/opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: already initialized constant MAC_MATCH
       /opt/chef/embedded/lib/ruby/gems/2.7.0/gems/ohai-16.7.37/lib/ohai/plugins/eucalyptus.rb:32: warning: previous definition of MAC_MATCH was here
       [2020-12-08T22:44:16+00:00] ERROR: shard_seed: Failed to get dmi property serial_number: is dmidecode installed?

             - re-run ohai and merge results into node attributes
           - detach volume with id: vol-0fa4d767360e8acec
           * ohai[Reload Ohai data for volume change] action nothing (skipped due to action :nothing)

       Running handlers:
       Running handlers complete
       Chef Infra Client finished, 20/27 resources updated in 01 minutes 10 seconds
       Downloading files from <ebs-volume-amazon-201709>
       Finished converging <ebs-volume-amazon-201709> (1m16.85s).
-----> Setting up <ebs-volume-amazon-201709>...
       Finished setting up <ebs-volume-amazon-201709> (0m0.00s).
-----> Verifying <ebs-volume-amazon-201709>...

Test Summary: 0 successful, 0 failures, 0 skipped
       Finished verifying <ebs-volume-amazon-201709> (0m2.52s).
-----> Destroying <ebs-volume-amazon-201709>...
pass options to configure the waiter; yielding the waiter is deprecated
       Waited 0/300s for instance <i-05a667beadfac5a0a> to terminate.
       Waited 5/300s for instance <i-05a667beadfac5a0a> to terminate.
       Waited 10/300s for instance <i-05a667beadfac5a0a> to terminate.
       Waited 15/300s for instance <i-05a667beadfac5a0a> to terminate.
       Waited 20/300s for instance <i-05a667beadfac5a0a> to terminate.
       Waited 25/300s for instance <i-05a667beadfac5a0a> to terminate.
       EC2 instance <i-05a667beadfac5a0a> destroyed.
       Removing automatic security group sg-022ee8fdc1515081f
       Finished destroying <ebs-volume-amazon-201709> (0m26.93s).
       Finished testing <ebs-volume-amazon-201709> (3m36.01s).
-----> Test Kitchen is finished. (3m38.68s)
tas50 commented 3 years ago

Thanks for the test output. That's helpful with this cookbook since it's a tricky on to test in CI