Skip to content

Adding error suggestion to generic error while copying GDG if its in edit mode. #2220

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

Merged
merged 8 commits into from
Aug 11, 2025

Conversation

Rohitcodes28
Copy link
Collaborator

SUMMARY

The error from the ZOAU is very generic and does not suggest that the possible failure reason can be the src GDG in edit mode or being used by another task. This change improves the error handling and gives user a suggestion to resolve the issue.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zos_copy

ADDITIONAL INFORMATION


@Rohitcodes28
Copy link
Collaborator Author

Initial Error is
image

@Rohitcodes28
Copy link
Collaborator Author

Rohitcodes28 commented Aug 5, 2025

Improved Error is
image

@Rohitcodes28
Copy link
Collaborator Author

Rohitcodes28 commented Aug 5, 2025

Playbook to check the issue

    - name: Create GDG base
      zos_data_set:
          name: "GDG.SAMPLE.TEST"
          type: gdg
          state: present
          limit: 3
          force: true
          replace: false
          record_format: fb
          space_primary: 5
          space_secondary: 3
          space_type: m
       register: dataset_creation
      
    - name: Add "helloworld" data to the first GDG generation
      zos_copy:
        content: "helloworld"
        dest: "GDG.SAMPLE.TEST(+1)"
        is_binary: false

    - name: Add "helloworld" data to the second GDG generation
      zos_copy:
        content: "helloworld 2nd"
        dest: "GDG.SAMPLE.TEST(+1)"
        is_binary: false

After this we need to make sure the created generations is in edit state and post that we should run another playbook

    - name: Copy a file to a new generation data set.
      zos_copy:
        src: GDG.SAMPLE.TEST
        dest: GDG.SAMPLE.COPY
        remote_src: true
        force_lock: true

@Rohitcodes28
Copy link
Collaborator Author

Finally if the GDG is not in use the copy function is successful
image

@Rohitcodes28
Copy link
Collaborator Author

Pipeline was tested successfully for the same.
image

@Rohitcodes28 Rohitcodes28 marked this pull request as ready for review August 6, 2025 22:35
Copy link
Collaborator

@fernandofloresg fernandofloresg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested few changes, not needed to run full regression only test it

Copy link
Collaborator

@fernandofloresg fernandofloresg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fernandofloresg fernandofloresg merged commit eae35f9 into staging-v1.16.0-beta.1 Aug 11, 2025
5 checks passed
@fernandofloresg fernandofloresg deleted the bug/1984/GDG_error branch August 11, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] When copying GDG to GDG and source GDS is in use the destination GDS is empty
3 participants