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

Product label should not produce a warning #1550

Open
kkeane opened this issue Jan 7, 2023 · 0 comments
Open

Product label should not produce a warning #1550

kkeane opened this issue Jan 7, 2023 · 0 comments

Comments

@kkeane
Copy link

kkeane commented Jan 7, 2023

SUMMARY

When specifying a label in the product module, and a product with the given name already exists, the module will produce a warning. It should instead use the label to identify the product, and update the name instead.

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible [core 2.12.10]
  config file = None
  configured module search path = ['/home/kkeane/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/kkeane/.virtualenvs/ansible5.4/lib/python3.8/site-packages/ansible
  ansible collection location = /home/kkeane/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/kkeane/.virtualenvs/ansible5.4/bin/ansible
  python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection                    Version
----------------------------- -------
amazon.aws                    2.1.0
ansible.netcommon             2.5.1
ansible.posix                 1.3.0
ansible.utils                 2.5.0
ansible.windows               1.9.0
arista.eos                    3.1.0
awx.awx                       19.4.0
azure.azcollection            1.11.0
check_point.mgmt              2.2.2
chocolatey.chocolatey         1.2.0
cisco.aci                     2.1.0
cisco.asa                     2.1.0
cisco.intersight              1.0.18
cisco.ios                     2.7.1
cisco.iosxr                   2.7.0
cisco.ise                     1.2.1
cisco.meraki                  2.6.0
cisco.mso                     1.3.0
cisco.nso                     1.0.3
cisco.nxos                    2.9.0
cisco.ucs                     1.6.0
cloud.common                  2.1.0
cloudscale_ch.cloud           2.2.0
community.aws                 2.3.0
community.azure               1.1.0
community.ciscosmb            1.0.4
community.crypto              2.2.2
community.digitalocean        1.15.1
community.dns                 2.0.7
community.docker              2.2.0
community.fortios             1.0.0
community.general             4.5.0
community.google              1.0.0
community.grafana             1.3.2
community.hashi_vault         2.3.0
community.hrobot              1.2.2
community.kubernetes          2.0.1
community.kubevirt            1.0.0
community.libvirt             1.0.2
community.mongodb             1.3.2
community.mysql               2.3.4
community.network             3.0.0
community.okd                 2.1.0
community.postgresql          1.7.0
community.proxysql            1.3.1
community.rabbitmq            1.1.0
community.routeros            2.0.0
community.skydive             1.0.0
community.sops                1.2.0
community.vmware              1.17.1
community.windows             1.9.0
community.zabbix              1.5.1
containers.podman             1.9.1
cyberark.conjur               1.1.0
cyberark.pas                  1.0.13
dellemc.enterprise_sonic      1.1.0
dellemc.openmanage            4.4.0
dellemc.os10                  1.1.1
dellemc.os6                   1.0.7
dellemc.os9                   1.0.4
f5networks.f5_modules         1.14.0
fortinet.fortimanager         2.1.4
fortinet.fortios              2.1.4
frr.frr                       1.0.3
gluster.gluster               1.0.2
google.cloud                  1.0.2
hetzner.hcloud                1.6.0
hpe.nimble                    1.1.4
ibm.qradar                    1.0.3
infinidat.infinibox           1.3.3
infoblox.nios_modules         1.2.1
inspur.sm                     1.3.0
junipernetworks.junos         2.9.0
kubernetes.core               2.2.3
mellanox.onyx                 1.0.0
netapp.aws                    21.7.0
netapp.azure                  21.10.0
netapp.cloudmanager           21.14.0
netapp.elementsw              21.7.0
netapp.ontap                  21.16.0
netapp.storagegrid            21.9.0
netapp.um_info                21.8.0
netapp_eseries.santricity     1.2.13
netbox.netbox                 3.5.1
ngine_io.cloudstack           2.2.3
ngine_io.exoscale             1.0.0
ngine_io.vultr                1.1.0
openstack.cloud               1.7.0
openvswitch.openvswitch       2.1.0
ovirt.ovirt                   1.6.6
purestorage.flasharray        1.12.1
purestorage.flashblade        1.9.0
sensu.sensu_go                1.13.0
servicenow.servicenow         1.0.6
splunk.es                     1.0.2
t_systems_mms.icinga_director 1.27.1
theforeman.foreman            2.2.0
vyos.vyos                     2.7.0
wti.remote                    1.0.3

Note: not sure why it reports theforeman.foreman 2.2.0. Ansible-galaxy collection list theforeman.foreman reports version 3.8.0:


# /home/kkeane/.virtualenvs/ansible5.4/lib/python3.8/site-packages/ansible_collections
Collection         Version
------------------ -------
theforeman.foreman 2.2.0

# /home/kkeane/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
theforeman.foreman 3.8.0
KATELLO/FOREMAN VERSION

I assume this is supposed to be on the server? In any case, there is no package tfm-rubygem-katello, but there is a package rubygem-katello

package tfm-rubygem-katello is not installed
foreman-3.4.1-1.el8.noarch

rpm -q rubygem-katello
rubygem-katello-4.6.0-1.el8.noarch
STEPS TO REPRODUCE
  • Create a product named "Testproduct 1" with the label testproduct_1
  • Use Ansible to update the description, using the same label but a different name.

Precondition: ensure that there is no product with the names "Testproduct 1" or "Testproduct 1 changed", and no product with the label "testproduct_1".

Note: this test case is artificial; it should work but I have not run this exact sequence.

      theforeman.foreman.product:
        name:           Testproduct 1
        label:          testproduct_1
        organization:   <whatever is appropriate>

      theforeman.foreman.product:
        name:           Testproduct 1
        label:          testproduct_1
        description: Updating the description
        organization:   <whatever is appropriate>

      theforeman.foreman.product:
        name:           Testproduct 1 changed
        label:          testproduct_1
        organization:   <whatever is appropriate>
EXPECTED RESULTS

All three module calls should complete without an error. You should end up with a product with the name "Testproduct 1 changed", the label "testproduct_1" and the description "Updating the description"

ACTUAL RESULTS

The second call succeeds but produces the following warning:

[WARNING]: The following parameters are not supported by your server when performing update on products: {'label'}. They were ignored.

I am not sure if the third call will succeed or fail.

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