Fix the following notices when creating a AWS cloud service provider:
Notice: Undefined index: KmsKeyId in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateVolume() (line 897 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: VirtualizationType in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateVolume() (line 889 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: StateMessage in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateSnapshot() (line 639 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: OwnerAlias in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateSnapshot() (line 638 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: KmsKeyId in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateSnapshot() (line 636 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: AllocationId in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateNetworkInterface() (line 492 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: InstanceId in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateNetworkInterface() (line 489 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
Notice: Undefined index: Association in Drupal\aws_cloud\Service\Ec2\Ec2BatchOperations::updateNetworkInterface() (line 492 of /var/www/html/web/cloud-stateful/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2BatchOperations.php)
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 3108469-17.patch | 10 KB | jigish.addweb |
Comments
Comment #2
jigish.addweb commentedComment #3
yas@jigishaddweb
Thank you for providing the patch. Could you please change the following code?
FROM:
TO:
Comment #4
yasComment #5
jigish.addweb commentedComment #6
jigish.addweb commented@yas
Thank you for reviewing the patch.I have changed the code.
Please review new patch.
Thanks.
Comment #7
baldwinlouie commented@jigish, Thank you for supplying this patch. When I'm testing with my EC2 account, I encountered some more PHP warnings.
Can you please fix these in the patch too?
Comment #8
swatichouhan012 commented@baldwinlouie I am assigning this to me to work on the above issue.
Comment #9
swatichouhan012 commentedI fixed notices in Ec2BatchOperations.php please review patch.
Comment #10
rithesh bk commented@swatichouhan, Thank you for supplying this patch. When I have installed the module for the same i found some issues which i have attached the screenshot. it is throwing "Error: Class 'Aws\Endpoint\EndpointProvider' not found in Drupal\aws_cloud\Service\Ec2\Ec2Service->getEndpointUrls() (line 784 of /var/www/html/contrib/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2Service.php)".
Please find the steps to reproduce the issue
1. install the cloud module with same version (8.x-2.x-dev)
2. install one of the cloud service providers which will be present within the Cloud module as shown in screenshot (aws_cloud.png)
3. go to "admin/config/services/cloud/aws_cloud"
4. click "Add Profile" as shown in the screenshot (cloud_error.png)
5. check the drupal admin console (drupal_console.png)
Comment #11
baldwinlouie commented@Rithesh, please make sure to install the AWS PHP SDK as defined in the README.md file, in the installation section. The easiest way is to use composer to download and install the library.
Comment #12
baldwinlouie commented@swatichouhan and @jigish,
Thank you for the updated patch. There is one more warning to fix. Please see attached screenshot.
Comment #13
jigish.addweb commentedComment #14
jigish.addweb commentedComment #15
jigish.addweb commented@baldwinlouie
Thank you for reviewing the patch.
I have fixed all warnings.
Please review new patch.
Thanks
Comment #16
baldwinlouie commented@jigish, Thank you for the patch. I ran the patch locally, and found some more issues.
See screenshot, which happens during a refresh.
Secondly on line 205:
we should be checking for NULL
Finally, when adding a new cloud service provider, I encountered the following errors
Comment #17
jigish.addweb commentedComment #18
jigish.addweb commented@baldwinlouie
Thank you for your review. I have fixed some other warnings.
Please test new patch.
Thanks
Comment #19
baldwinlouie commented@jigish. This patch looks good now.
@yas, can you please do a review using your EC2 account to make sure my EC2 account didn't miss anything during the create process?
Comment #20
baldwinlouie commentedComment #21
yas@baldwinlouie
Thank you for your review. I tested the patch on my local testing env and looks good to me now. I'll merge the patch to
8.x-1.xand8.x-2.xand close this issue asFixed.Comment #24
yasComment #25
yas