Due the error below, the elastic IP in US region can't be deleted.

Error: The operation "ReleaseAddress" could not be performed.

Error Info: InvalidParameterValue

Error from: client-side

Status Code: 400

Message: You must specify an allocation id when releasing a VPC elastic IP address

The AWS Cloud Elastic IP "ip1" couldn't delete.

Comments

Xiaohua Guan created an issue. See original summary.

xiaohua guan’s picture

If elastic ip is created as standard type, the domain of the new elastic IP entity will be standard, but US region don't support standard type, the vpc one will be created.

When deleting the entity, the ip address will be passed as parameter, but because the real type is vpc, allocation id is needed. Therefore, the elastic ip can't be deleted.

xiaohua guan’s picture

StatusFileSize
new3.49 KB
xiaohua guan’s picture

@yas

Please review.

xiaohua guan’s picture

Status: Active » Needs review
yas’s picture

@xiaohua-guan Thank you for providing the patch including the test code.

@baldwinlouie Could you please review the patch?

baldwinlouie’s picture

Status: Needs review » Needs work

@xiaohua-guan, I looked at this patch. Instead of directly calling this:

($entity->set('domain', $result['Domain']))

Can you please add a helper method to ElasticIp.php such as setDomain(). Then in ElasticIpCreateForm.php's save() method, use the helper method instead of calling

$entity->set('domain', $result['Domain']))

This will make it consistent with how the other attributes are set.

xiaohua guan’s picture

StatusFileSize
new4.22 KB
xiaohua guan’s picture

xiaohua guan’s picture

Status: Needs work » Needs review
xiaohua guan’s picture

@baldwinlouie

Thanks for your review. I changed code as you said. Please review it again.

baldwinlouie’s picture

Status: Needs review » Reviewed & tested by the community

Marking RTBC

  • yas committed f7db9a4 on 8.x-1.x authored by Xiaohua Guan
    Issue #3014158 by Xiaohua Guan, baldwinlouie, yas: Can't delete Elastic...
yas’s picture

Status: Reviewed & tested by the community » Fixed

@xiaohua-guan
@baldwinlouie

Thank you for your contributions. I merged that patch successfully.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.