Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1596840 - oc_storageclass module can't edit annotations on existing objects
Summary: oc_storageclass module can't edit annotations on existing objects
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.1.0
Assignee: Stefanie Forrester
QA Contact: Johnny Liu
Depends On:
TreeView+ depends on / blocked
Reported: 2018-06-29 19:05 UTC by Stefanie Forrester
Modified: 2019-03-12 14:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-01-28 18:14:54 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Stefanie Forrester 2018-06-29 19:05:07 UTC
Description of problem:

I'm attempting to use the oc_storageclass module to apply an annotation to both existing and new storageclasses, using this code:

  - name: Create a new default storageclass with encryption
      name: gp2-encrypted
      default_storage_class: true
        type: gp2
        zone: "{{ oesc_zone }}"
        encrypted: "true"
      annotations: ReadWriteOnce
    run_once: true

It successfully adds the annotation when the storageclass is being created, but if the storageclass already exists, it doesn't add the annotation.

Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version


How reproducible:

Every time, when making changes to an existing storageclass.

Steps to Reproduce:
1. Create the gp2-encrypted storageclass without the above annotation.
2. View the storageclass to confirm it is created and has no annotation.
3. Run the above code to try and apply the annotation to the storageclass.

Actual results:

The storageclass is not modified, and the annotation is not added.

Expected results:

The annotation should be added to the existing storageclass, if it doesn't already exist.

Additional info:

Note You need to log in before you can comment on or make changes to this bug.