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

Update Redis modules #680

Merged
merged 17 commits into from
Apr 14, 2022
Merged

Conversation

l3ender
Copy link
Contributor

@l3ender l3ender commented Nov 10, 2021

SUMMARY

This PR updates the following:

  • Bumps redis SDK to latest version.
  • Adds following parameters to azure_rm_rediscache:
    • minimum_tls_version: minimum TLS version allowed by the client.
    • public_network_access: enable/disable public network access.
    • redis_version: create cache at a specified Redis version.
  • Correct Redis reboot and key regeneration to return changed=true (resource is updated during module).
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • azure_rm_rediscache
  • azure_rm_rediscache_info
ADDITIONAL INFORMATION

Using the following playbook at the root of this repo:

---
- name: "Playbook for testing."
  hosts: "localhost"
  connection: "local"
  gather_facts: false
  vars:
    resource_group: "test-rg"
  collections:
    - azure.azcollection

  tasks:
    - name: "Include tests"
      include_tasks: tests/integration/targets/azure_rm_rediscache/tasks/main.yml
Click to view playbook output
-> ansible-playbook sandbox.yml --tags long_run,untagged
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Playbook for testing.] ************************************************************************************************************************************************************

TASK [Include tests] ********************************************************************************************************************************************************************
included: /Users/ross/repos/azure/tests/integration/targets/azure_rm_rediscache/tasks/main.yml for localhost

TASK [Fix resource prefix] **************************************************************************************************************************************************************
ok: [localhost]

TASK [Create a redis cache (Check Mode)] ************************************************************************************************************************************************
[WARNING]: Azure API profile latest does not define an entry for RedisManagementClient
changed: [localhost]

TASK [Assert creating redis cache check mode] *******************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create a redis cache] *************************************************************************************************************************************************************
changed: [localhost]

TASK [Assert creating redis cache] ******************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get facts] ************************************************************************************************************************************************************************
ok: [localhost]

TASK [Assert facts] *********************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update the redis cache (idempotent)] **********************************************************************************************************************************************
ok: [localhost]

TASK [assert output not changed] ********************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create a redis cache with enhanced configuration options] *************************************************************************************************************************
changed: [localhost]

TASK [Assert creating redis cache] ******************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get facts for enhanced cache] *****************************************************************************************************************************************************
ok: [localhost]

TASK [Assert enhanced cache facts] ******************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Wait for Redis provisioning to complete] ******************************************************************************************************************************************
FAILED - RETRYING: Wait for Redis provisioning to complete (30 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (29 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (28 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (27 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (26 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (25 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (24 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (23 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (22 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (21 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (20 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (19 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (18 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (17 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (16 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (15 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (14 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (13 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (12 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (11 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (10 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (9 retries left).
ok: [localhost]

TASK [(actually) update redis cache] ****************************************************************************************************************************************************
changed: [localhost]

TASK [assert output changed] ************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update redis cache configuration] *************************************************************************************************************************************************
changed: [localhost]

TASK [assert output changed] ************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Scale up the redis cache] *********************************************************************************************************************************************************
changed: [localhost]

TASK [assert] ***************************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Force reboot redis cache] *********************************************************************************************************************************************************
changed: [localhost]

TASK [assert redis rebooted] ************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the redis cache (Check Mode)] **********************************************************************************************************************************************
changed: [localhost]

TASK [assert deleting redis cache check mode] *******************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the redis cache] ***********************************************************************************************************************************************************
changed: [localhost]

TASK [assert] ***************************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create virtual network] ***********************************************************************************************************************************************************
changed: [localhost]

TASK [Add subnet] ***********************************************************************************************************************************************************************
changed: [localhost]

TASK [Create redis with subnet] *********************************************************************************************************************************************************
changed: [localhost]

TASK [Assert creating redis cache] ******************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get facts] ************************************************************************************************************************************************************************
ok: [localhost]

TASK [Assert facts] *********************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create firewall rule (Check mode)] ************************************************************************************************************************************************
changed: [localhost]

TASK [Assert check mode creation] *******************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Wait for Redis provisioning to complete] ******************************************************************************************************************************************
FAILED - RETRYING: Wait for Redis provisioning to complete (30 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (29 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (28 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (27 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (26 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (25 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (24 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (23 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (22 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (21 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (20 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (19 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (18 retries left).
FAILED - RETRYING: Wait for Redis provisioning to complete (17 retries left).
ok: [localhost]

TASK [Create firewall rule] *************************************************************************************************************************************************************
changed: [localhost]

TASK [Assert creation] ******************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update firewall rule idempotence] *************************************************************************************************************************************************
ok: [localhost]

TASK [Assert idempotence] ***************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update firewall rule] *************************************************************************************************************************************************************
changed: [localhost]

TASK [Assert updating] ******************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get key facts] ********************************************************************************************************************************************************************
ok: [localhost]

TASK [regenerate primary redis key] *****************************************************************************************************************************************************
changed: [localhost]

TASK [Assert output] ********************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get facts after key regeneration] *************************************************************************************************************************************************
ok: [localhost]

TASK [Assert key change] ****************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete firewall rule] *************************************************************************************************************************************************************
changed: [localhost]

TASK [Assert deletion] ******************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the redis cache] ***********************************************************************************************************************************************************
changed: [localhost]

PLAY RECAP ******************************************************************************************************************************************************************************
localhost                  : ok=50   changed=18   unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

@l3ender l3ender changed the title Update rediscache modules Update Redis modules Nov 10, 2021
@l3ender
Copy link
Contributor Author

l3ender commented Nov 10, 2021

@Fred-sun Please review...thank you!

@Fred-sun
Copy link
Collaborator

@l3ender Thank you for your contribution. We will push forward the import process of new SDK as soon as possible and review the PR. Thank you very much!

@Fred-sun Fred-sun added enhancement New feature or request medium_priority Medium priority new_feature New feature requirments work in In trying to solve, or in working with contributors labels Nov 12, 2021
@Fred-sun Fred-sun added the hold The problem holds for a particular reason label Nov 23, 2021
@l3ender
Copy link
Contributor Author

l3ender commented Jan 28, 2022

Hello @Fred-sun, can you please provide an update on this PR? Thank you!

@Fred-sun
Copy link
Collaborator

@l3ender Ok, I will push forward the merger of this PR as soon as possible. Thank you very much!

@Fred-sun Fred-sun removed the hold The problem holds for a particular reason label Feb 27, 2022
@l3ender
Copy link
Contributor Author

l3ender commented Mar 23, 2022

@Fred-sun Is this ready to go? Thank you!

@Fred-sun
Copy link
Collaborator

Fred-sun commented Apr 6, 2022

@l3ender Can the three parameters you newly added be updated? If so, please add the update logic. If not, please report an error message. Thank you very much!

@l3ender
Copy link
Contributor Author

l3ender commented Apr 13, 2022

@Fred-sun Thank you for the comment. I have updated the PR to include update logic for the new parameters. Thank you!

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Apr 14, 2022
@xuzhang3
Copy link
Collaborator

LGTM

@xuzhang3 xuzhang3 merged commit a62d117 into ansible-collections:dev Apr 14, 2022
@xuzhang3 xuzhang3 deleted the redis-enhancements branch April 14, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium_priority Medium priority new_feature New feature requirments ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants