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

VM Host Failure - Available Policy Development #3604

Merged
merged 2 commits into from
Mar 15, 2022

Conversation

SunithaGudisagarIBM
Copy link
Collaborator

@SunithaGudisagarIBM SunithaGudisagarIBM commented Feb 22, 2022

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccIBMISInstance_withAvailablePolicy'
$ make testacc TESTARGS='-run=TestAccIBMISInstanceTemplate_withAvilablePolicy'

$ make testacc TESTARGS='-run=TestAccIBMISInstanceTemplate_dataBasic'
$ make testacc TESTARGS='-run=TestAccIBMISInstanceTemplates_dataBasic'
$ make testacc TESTARGS='-run=TestAccIBMISInstanceDataSource_basic'
$ make testacc TESTARGS='-run=TestAccIBMISInstancesDataSource_basic'

Screenshot 2022-02-27 at 4 24 01 PM

Screenshot 2022-02-27 at 4 28 42 PM

Screenshot 2022-02-27 at 7 46 38 PM

Screenshot 2022-02-27 at 7 58 41 PM

Screenshot 2022-02-27 at 8 00 16 PM

Screenshot 2022-02-27 at 8 08 37 PM

@SunithaGudisagarIBM SunithaGudisagarIBM marked this pull request as ready for review February 27, 2022 14:46
@ujjwal-ibm
Copy link
Collaborator

#3631

@deepaksibm deepaksibm force-pushed the feature-is-ga-vmhostfailure branch 2 times, most recently from 4c124fe to 02ec11b Compare March 8, 2022 09:39
isInstanceStatusRunning = "running"
isInstanceStatusFailed = "failed"
isInstanceAvailablePolicyHostFailure = "availability_policy_host_failure"
isInstanceHostFailure = "host_failure"
Copy link
Collaborator

Choose a reason for hiding this comment

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

where are we using this isInstanceHostFailure

Copy link
Contributor

Choose a reason for hiding this comment

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

removed

@@ -158,6 +160,13 @@ func ResourceIBMISInstance() *schema.Resource {
),

Schema: map[string]*schema.Schema{
isInstanceAvailablePolicyHostFailure: {
Type: schema.TypeString,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will it be both optional and computed..

When user provisions a VM without any availability_policy_host_failure what is the value set in computed

Copy link
Contributor

Choose a reason for hiding this comment

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

it is set with teh default value from the API, which is "restart"

Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you run one scenario create a template using old binary and then use this new binary and run Terraform plan and check if plan is showing any diff (both for instance, template you do this testing)

Copy link
Contributor

Choose a reason for hiding this comment

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

TF plan says No changes. Infrastructure is up-to-date.

@@ -338,7 +339,7 @@ Review the argument references that you can specify for your resource.

## Attribute reference
In addition to all argument reference list, you can access the following attribute reference after your resource is created.

- `availability_policy_host_failure` - (String) The availability policy to use for this virtual server instance. The action to perform if the compute host experiences a failure.
Copy link
Collaborator

Choose a reason for hiding this comment

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

availability_policy_host_failure is a argument no need to be presen in Attribute Refrence

Copy link
Contributor

Choose a reason for hiding this comment

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

removed

@deepaksibm
Copy link
Contributor

$ make testacc TEST=./ibm/service/vpc TESTARGS='-run=TestAccIBMISInstance_ResizeBoot'
=== RUN   TestAccIBMISInstance_ResizeBoot
no message sent
no message sent
no message sent
no message sent
no message sent
--- PASS: TestAccIBMISInstance_ResizeBoot (295.74s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc     296.864s
$ make testacc TEST=./ibm/service/vpc TESTARGS='-run=TestAccIBMISInstance_withAvailablePolicy'
=== RUN   TestAccIBMISInstance_withAvailablePolicy
no message sent
no message sent
no message sent
no message sent
no message sent
no message sent
no message sent
no message sent
no message sent
no message sent
--- PASS: TestAccIBMISInstance_withAvailablePolicy (474.49s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc     476.042s

@hkantare hkantare merged commit 517eca3 into IBM-Cloud:master Mar 15, 2022
@dprosper
Copy link
Contributor

The production docs seems to have gotten updated and show that this new argument is available:
image

however, it is not working with the latest production release of the provider:

image

is there a delay in between doc updates and provider update?

@deepaksibm
Copy link
Contributor

Hi @dprosper , i checked with the latest release 1.40.0-beta0 and i could see availability_policy_host_failure being accepted and updated in the state file. Could you please verify once if you're using the same latest version ?

image

@dprosper
Copy link
Contributor

dprosper commented Mar 22, 2022

Hello @deepaksibm yes I do see it and it is working in the beta, the question is production release and docs. should docs be updated when it is not available in the production release?

There is no indication in the docs that I can tell that this is a beta feature
installing the beta release is not by default, I had to choose.

I think the docs should reflect that it is a new flag accepted in the beta only
or
there should be separate beta docs
or
....

There is a delay between the production and the docs release and I don't think there should be.

@astha-jain
Copy link
Contributor

Hi @dprosper VM Host is GA. and this release 1.40.0-beta0 is not for supporting Beta features but it is a pre-release version for GA features going to be available in this month's Terraform provider release.

@SunithaGudisagarIBM SunithaGudisagarIBM deleted the feature-is-ga-vmhostfailure branch July 14, 2022 09:00
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.

7 participants