Skip to content

Commit

Permalink
[OCI] set zone in the ProvisionRecord (#4383)
Browse files Browse the repository at this point in the history
* fix: Add zone to the ProvisionRecord

* fix
  • Loading branch information
HysunHe authored Nov 20, 2024
1 parent 50d7bc0 commit 627be72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sky/provision/oci/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def run_instances(region: str, cluster_name_on_cloud: str,
# Let's create additional new nodes (if neccessary)
to_start_count = config.count - len(resume_instances)
created_instances = []
node_config = config.node_config
if to_start_count > 0:
node_config = config.node_config
compartment = query_helper.find_compartment(region)
vcn = query_helper.find_create_vcn_subnet(region)

Expand Down Expand Up @@ -242,10 +242,12 @@ def run_instances(region: str, cluster_name_on_cloud: str,

assert head_instance_id is not None, head_instance_id

# Format: TenancyPrefix:AvailabilityDomain, e.g. bxtG:US-SANJOSE-1-AD-1
_, ad = str(node_config['AvailabilityDomain']).split(':', maxsplit=1)
return common.ProvisionRecord(
provider_name='oci',
region=region,
zone=None,
zone=ad,
cluster_name=cluster_name_on_cloud,
head_instance_id=head_instance_id,
created_instance_ids=[n['inst_id'] for n in created_instances],
Expand Down

0 comments on commit 627be72

Please sign in to comment.