Skip to content

wip: Oracle Cloud support#871

Open
navaneeth-dev wants to merge 5 commits into
flatcar:mainfrom
navaneeth-dev:oracle-cloud-mvp
Open

wip: Oracle Cloud support#871
navaneeth-dev wants to merge 5 commits into
flatcar:mainfrom
navaneeth-dev:oracle-cloud-mvp

Conversation

@navaneeth-dev

Copy link
Copy Markdown

Adds Oracle Cloud Testing Support

Adds Oracle Cloud Testing Support.

Copilot AI review requested due to automatic review settings June 22, 2026 12:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Signed-off-by: Navaneeth <me@rizexor.com>
@navaneeth-dev

navaneeth-dev commented Jun 22, 2026

Copy link
Copy Markdown
Author

private ipv4 & public ip is not exposed via afterburn in Oracle which is required for some tests. So I need to add it upstream. For now I will use systemd hack. Correct me if I am mistaken. @tormath1

https://github.com/coreos/afterburn/blob/main/docs/usage/attributes.md#metadata-attributes

Signed-off-by: Navaneeth <me@rizexor.com>
Copilot AI review requested due to automatic review settings June 22, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@navaneeth-dev

Copy link
Copy Markdown
Author

I think my PR is ready. Let me know what else to implement.

=== RUN   cl.basic
=== RUN   cl.basic/ReadOnly
=== RUN   cl.basic/MachineID
=== RUN   cl.basic/CloudConfig
=== RUN   cl.basic/Script
=== RUN   cl.basic/SymlinkFlatcar
=== RUN   cl.basic/UpdateEngineKeys
=== RUN   cl.basic/ServicesActive
=== RUN   cl.basic/RandomUUID
=== RUN   cl.basic/Useradd
=== RUN   cl.basic/Microcode
=== RUN   cl.basic/PortSSH
=== RUN   cl.basic/DbusPerms
=== RUN   cl.basic/Symlink
2026-06-22T16:54:31Z platform/machine/oracle: leaving OCI instance ocid1.instance.oc1.ap-hyderabad-1.anuhsljrnkxuiqicotltjhtzulsbtt4d4uwwpkbd44tud7qbsd2mwmwdexlq running for SSH inspection
--- PASS: cl.basic (52.11s)
    --- PASS: cl.basic/ReadOnly (0.15s)
    --- PASS: cl.basic/MachineID (0.15s)
    --- PASS: cl.basic/CloudConfig (0.70s)
    --- PASS: cl.basic/Script (0.28s)
    --- PASS: cl.basic/SymlinkFlatcar (0.14s)
    --- PASS: cl.basic/UpdateEngineKeys (0.14s)
    --- PASS: cl.basic/ServicesActive (0.15s)
    --- PASS: cl.basic/RandomUUID (0.18s)
    --- PASS: cl.basic/Useradd (0.33s)
    --- PASS: cl.basic/Microcode (0.18s)
    --- PASS: cl.basic/PortSSH (0.14s)
    --- PASS: cl.basic/DbusPerms (0.54s)
    --- PASS: cl.basic/Symlink (0.14s)
PASS, output in _kola_temp/oracle-2026-06-22-2223-103411

@navaneeth-dev navaneeth-dev marked this pull request as ready for review June 22, 2026 16:58
@navaneeth-dev navaneeth-dev requested a review from a team as a code owner June 22, 2026 16:58

@tormath1 tormath1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot, overally it looks good. I just have one request, usually the ore command is used to create and upload an image on the cloud provider. Is that possible to implement this?

It's then used like that: https://github.com/flatcar/scripts/blob/d2c217cb741debc9becda0bda86347319f17a65c/ci-automation/vendor-testing/stackit.sh#L24-L48

We first upload the image then we use the resulting image ID in the kola run command.

return nil, fmt.Errorf("launching instance: %w", err)
}

instance, err := a.WaitForInstanceState(ctx, *resp.Instance.Id, core.InstanceLifecycleStateRunning)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems that the Go SDK has a Retry mechanism, that would be interesting to use it: https://pkg.go.dev/github.com/oracle/oci-go-sdk/v65#hdr-Retry

Mantle has its own Retry function as well:

$ go doc util.Retry
package util // import "github.com/flatcar/mantle/util"

func Retry(attempts int, delay time.Duration, f func() error) error
    Retry calls function f until it has been called attemps times, or succeeds.
    Retry delays for delay between calls of f. If f does not succeed after
    attempts calls, the error from the last call is returned.

Signed-off-by: Navaneeth <me@rizexor.com>
Signed-off-by: Navaneeth <me@rizexor.com>
Copilot AI review requested due to automatic review settings June 26, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Signed-off-by: Navaneeth <me@rizexor.com>
@navaneeth-dev

Copy link
Copy Markdown
Author

Done, tested ore image uploads.

➜ IMAGE_ID=$(./bin/ore oracle \
  --oracle-config-file="${ORACLE_CONFIG_FILE:-$HOME/.oci/config}" \
  --oracle-profile="${ORACLE_PROFILE:-DEFAULT}" \
  --oracle-compartment-id="${ORACLE_COMPARTMENT_ID}" \
  --oracle-bucket="${ORACLE_BUCKET}" \
  create-image \
  --board="${CIA_ARCH:-amd64}-usr" \
  --name="flatcar-oracle-upload-test-$(date +%s)" \
  --file="${ORACLE_IMAGE_NAME}"
)

echo "${IMAGE_ID}"
ocid1.image.oc1.ap-hyderabad-1.aaaaaaaairf3z42rr5qlebezgmxpyaitpyok7bm24inistcnujec7jiohbqa

Added retry also, using DefaultRetryPolicy of OCI SDK:

Retries 409 IncorrectState
Retries 409 LockConflict
Retries 429 TooManyRequests
Retries 5xx, except 501 MethodNotImplemented
Uses exponential backoff with jitter
Maximum wait per retry is about 30s + 1s jitter
Up to 8 attempts
Cumulative backoff is about 1.5 minutes
With eventual consistency handling, up to 9 attempts
Eventual consistency cumulative backoff is about 4 minutes

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