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

Inventory plugin: Support of ExaCC/CS database nodes #249

Open
jewdba opened this issue Oct 5, 2023 · 0 comments
Open

Inventory plugin: Support of ExaCC/CS database nodes #249

jewdba opened this issue Oct 5, 2023 · 0 comments

Comments

@jewdba
Copy link

jewdba commented Oct 5, 2023

Issue Report

Describe the issue

According to the documentation, only DBsystems are supported to become ansible managed nodes
https://github.com/oracle/oci-ansible-collection/blob/master/docs/inventory_plugin/index.rst

However, we already had a look at the code and we were able in our LAB to add the "db nodes" of our ExaCC VMclusters as ansible managed nodes.
/20160918/VmCluster/ListVmClusters

Nevertheless, the oci plugin is awaiting vnic details (plugins/inventory/oci.py) to extend host_vars, which do not exist on ExaCC/CS VMcluster as network resources are attached through a "VMclusterNetwork" resource.

Thus, by default the plugins/inventory/oci.py method build_inventory_for_db_host stops executing while retrieving the VNIC details

           vnic = oci_common_utils.call_with_backoff(
                virtual_nw_client.get_vnic, vnic_id=db_host.vnic_id
            ).data

            self.debug(
                "VNIC {0} is attached to db_host {1}.".format(vnic.id, db_host.id)
            )

Would you agree to add "try except" block? Thus, even if network details are still missing we could at least retrieve the list of nodes :)

Expected behavior

List database nodes as ansible managed nodes

Environment

  • OS version: macOS 13.5.1 (22G90)

  • Ansible version:

# oci-ansible-collection % ansible --version
ansible [core 2.15.3]
  config file = None
  configured module search path = ['/Users/jew/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/8.3.0/libexec/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/jew/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.5 (main, Aug 24 2023, 15:18:16) [Clang 14.0.3 (clang-1403.0.22.14.1)] (/usr/local/Cellar/ansible/8.3.0/libexec/bin/python)
  jinja version = 3.1.2
  libyaml = True
  • OCI Python SDK version:
# python -c "import oci;print(oci.__version__)"
2.110.1
  • OCI Ansible Modules version:
# ansible-galaxy collection list oracle.oci

# /<Path>/ansible_collections
Collection Version
---------- -------
oracle.oci 4.30.0
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

No branches or pull requests

1 participant