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

aws lightsail does not support wait: yes on create #63869

Closed
jillr opened this issue Oct 23, 2019 · 6 comments · Fixed by #65275
Closed

aws lightsail does not support wait: yes on create #63869

jillr opened this issue Oct 23, 2019 · 6 comments · Fixed by #65275
Labels
affects_2.10 This issue/PR affects Ansible v2.10 aws bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community.

Comments

@jillr
Copy link
Contributor

jillr commented Oct 23, 2019

SUMMARY

In #63770 it was found that the wait specified in the module docs does not apply to create operations. Wait functions are only defined for delete_instance, restart_instance, and startstop_instance.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

lightsail

ANSIBLE VERSION
$ ansible --version
ansible 2.10.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/jill/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jill/src/ansible/lib/ansible
  executable location = /home/jill/src/ansible/bin/ansible
  python version = 2.7.15+ (default, Oct  7 2019, 17:39:04) [GCC 7.4.0]

CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

STEPS TO REPRODUCE
    - name: Start the instance
      lightsail:
        name: "{{ instance_name }}"
        state: running
        wait: yes
      register: result

    - assert:
        that:
          - result.changed == True
          - result.instance.state.name == 'running'
EXPECTED RESULTS

test pass

ACTUAL RESULTS

assertion failed

@ansibot
Copy link
Contributor

ansibot commented Oct 23, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 23, 2019

@ansibot
Copy link
Contributor

ansibot commented Oct 23, 2019

@jillr, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 aws bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Oct 23, 2019
@prasadkatti
Copy link
Contributor

The has_pr label should be removed as the PR it refers to is the one where the issue was discovered, not where it was solved.

@prasadkatti
Copy link
Contributor

The lightsail client does not have any pre-defined waiters - boto3 lightsail doc.

@jillr
Copy link
Contributor Author

jillr commented Oct 23, 2019

Yeah it will need to be done via a while loop like: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/lightsail.py#L317:L328

prasadkatti added a commit to prasadkatti/ansible that referenced this issue Nov 26, 2019
- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes ansible#63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present
prasadkatti added a commit to prasadkatti/ansible that referenced this issue Nov 26, 2019
- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes ansible#63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present
jillr pushed a commit that referenced this issue Dec 2, 2019
* lightsail - Use AnsibleAWSModule

- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes #63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present

* lightsail - Use the default keypair if one is not provided

* lightsail - add a required_if for when state=present

* Update short description for lightsail module
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Dec 3, 2019
D3DeFi pushed a commit to D3DeFi/ansible that referenced this issue Dec 8, 2019
* lightsail - Use AnsibleAWSModule

- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes ansible#63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present

* lightsail - Use the default keypair if one is not provided

* lightsail - add a required_if for when state=present

* Update short description for lightsail module
anshulbehl pushed a commit to anshulbehl/ansible that referenced this issue Dec 10, 2019
* lightsail - Use AnsibleAWSModule

- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes ansible#63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present

* lightsail - Use the default keypair if one is not provided

* lightsail - add a required_if for when state=present

* Update short description for lightsail module
@ansible ansible locked and limited conversation to collaborators Jan 2, 2020
ruozeng-w pushed a commit to ruozeng-w/ansible that referenced this issue Apr 18, 2020
* lightsail - Use AnsibleAWSModule

- Use AnsibleAWSModule
- Refactor the logic for wait into a separate function (Fixes ansible#63869)
- Handle exceptions in find_instance_info and add a fail_if_not_found parameter
- Add a new state `rebooted` as an alias for `restarted`. AWS calls the action Reboot.
- Add required_if clause for when state is present

* lightsail - Use the default keypair if one is not provided

* lightsail - add a required_if for when state=present

* Update short description for lightsail module
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 aws bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants