Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement creating OCI resources #1276

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

jvstme
Copy link
Collaborator

@jvstme jvstme commented May 24, 2024

This enables dstack to automatically create OCI compartments and network resources on server launch. This is part of the OCI backend implementation (#1194). Behind the OCI_BACKEND feature flag.

This enables dstack to automatically create OCI
compartments and network resources on server
launch. This is part of the OCI backend
implementation. Behind the OCI_BACKEND feature
flag.
@jvstme jvstme requested a review from r4victor May 24, 2024 15:04
Copy link
Collaborator

@r4victor r4victor left a comment

Choose a reason for hiding this comment

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

I don't see where compartment_id is validated. How is it handled if it does not exist?

@jvstme
Copy link
Collaborator Author

jvstme commented May 27, 2024

@r4victor, compartment_id is optional in all models, but required in OCIStoredConfig. If it is missing, a default dstack-{project_name} compartment will be discovered or created before instantiating OCIStoredConfig

config.compartment_id = compartment_id

@jvstme
Copy link
Collaborator Author

jvstme commented May 27, 2024

Oh, maybe I misunderstood the question. If you were asking what would happen if you specify a nonexistent comparment_id in server config — the configurator will hang for about 3 minutes and then fail with an error message here. Unfortunately, I could not find a way to distinguish a nonexistent compartment from a compartment being created, so this wait is required, but specifying a wrong compartment_id should be a rare case.

@jvstme jvstme merged commit 3fb54eb into master May 28, 2024
15 checks passed
@jvstme jvstme deleted the issue_1194_oci_create_resources branch May 28, 2024 06:30
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.

2 participants