Skip to content

fix(oracle): update condition for setting public ips#493

Merged
uhryniuk merged 1 commit intocanonical:mainfrom
uhryniuk:fix/oracle/conditional-public-ip
Nov 26, 2025
Merged

fix(oracle): update condition for setting public ips#493
uhryniuk merged 1 commit intocanonical:mainfrom
uhryniuk:fix/oracle/conditional-public-ip

Conversation

@uhryniuk
Copy link
Copy Markdown
Contributor

@uhryniuk uhryniuk commented Nov 26, 2025

Description

The Oracle provider in pycloudlib will attempt to assign a public IP to the instance. However, the current implementation assumed that the subnet was always public but this may not be true.

To remedy this, we explicitly add checks that the subnet allows public ips to be assigned, then we set that configuration in the vnic details"

Additional Context and Relevant Issues

On other internal tooling, we began to see errors where when trying to launch instances that had a private subnet, they would fail with an API error.

“A problem occurred while preparing the instance's VNIC. ((400, InvalidParameter, false) Public IP addresses are prohibited in this subnet {ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxx} (opc-request-id: dummyRequestId))`

Test Steps

Launch an instance specifying a public subnet and ensure that IPs for ipv6 and ipv4 are both assigned.

Launch an instance specifying a private subnet and ensure no ips are attempted to even be allocated, as this would cause the above exception to be thrown.

The Oracle provider in pycloudlib will attempt to assign
a public IP to the instance. However, the current implementation
assumed that the subnet was always public but this may not be true.

To remedy this, we explicitly add checks that the subnet allows
public ips to be assigned, then we set that configuration in
the vnic details"
@uhryniuk uhryniuk force-pushed the fix/oracle/conditional-public-ip branch from 579fcb0 to db44331 Compare November 26, 2025 16:21
@uhryniuk uhryniuk force-pushed the fix/oracle/conditional-public-ip branch from cc98893 to db44331 Compare November 26, 2025 19:17
Copy link
Copy Markdown
Member

@Bryzizzle Bryzizzle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@uhryniuk uhryniuk merged commit df079b5 into canonical:main Nov 26, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants