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

[Bugfix][1856][zos_mount]Fails_using_persistat_option #1871

Open
wants to merge 47 commits into
base: dev
Choose a base branch
from

Conversation

AndreMarcel99
Copy link
Collaborator

@AndreMarcel99 AndreMarcel99 commented Jan 16, 2025

SUMMARY

Remove previous call to write manually text to the persistent dataset, now add validations using blockinfile and copy for easier validations.

Fixes #1856

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

Remove previous function to remove text by checking line by line, the new function use blockinfile

Captura de pantalla 2025-01-21 a la(s) 11 07 30 a m Captura de pantalla 2025-01-21 a la(s) 11 07 40 a m

@AndreMarcel99 AndreMarcel99 changed the title Bugfix/1856/fails when add option to update dataset with z fs mount [Bugfix][1856fails when add option to update dataset with z fs mount Jan 16, 2025
@AndreMarcel99 AndreMarcel99 changed the title [Bugfix][1856fails when add option to update dataset with z fs mount [Bugfix][1856][zos_mount]Fails_using_persistat_option Jan 16, 2025
@AndreMarcel99 AndreMarcel99 marked this pull request as ready for review January 21, 2025 17:07
content = fh.read().splitlines()
datasets.delete(dataset=data_store)
datasets.copy(source=bk_ds, target=data_store)
datasets.delete(dataset=bk_ds)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If something goes wrong while we are writing into the backup we should always delete the backup

@AndreMarcel99
Copy link
Collaborator Author

Captura de pantalla 2025-01-21 a la(s) 2 21 04 p m Captura de pantalla 2025-01-21 a la(s) 2 21 16 p m

@AndreMarcel99
Copy link
Collaborator Author

Captura de pantalla 2025-01-22 a la(s) 11 44 15 a m
Captura de pantalla 2025-01-22 a la(s) 11 44 28 a m

dest = get_tmp_ds_name()
dest_path = dest + "(AUTO1)"

hosts.all.zos_data_set(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you use zoau dtouch instead for creating this? We want to reduce on test dependency in ourselves plus is going to be more performant with the same result.

)
hosts.all.file(path=tmp_file_filename, state="absent")
hosts.all.file(path="/pythonx/", state="absent")
hosts.all.zos_data_set(
Copy link
Collaborator

Choose a reason for hiding this comment

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

same for this one, is better to use drm in the test cases.

@@ -255,6 +264,75 @@ def test_basic_mount_with_bpx_nocomment_nobackup(ansible_zos_module, volumes_on_
record_length=80,
)

def test_basic_mount_with_bpx_no_utf_8_characters_(ansible_zos_module, volumes_on_systems):
Copy link
Collaborator

Choose a reason for hiding this comment

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

It does not look like the test case is actually testing non UTF-8 characters, I tested building what we currently have in dev branch and then executed this test using :

./ac --ac-test --host ec33012a --python 3.11 --zoau 1.3.4 --file tests/functional/modules/test_zos_mount_func.py --debug --verbose vvv --test test_basic_mount_with_bpx_no_utf_8_characters_

@AndreMarcel99
Copy link
Collaborator Author

Captura de pantalla 2025-01-22 a la(s) 2 43 06 p m
Captura de pantalla 2025-01-22 a la(s) 2 43 18 p m

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

Successfully merging this pull request may close these issues.

[Bug] [zos_mount] Ansilbe - zos_mount - fails when add option to update dataset with zFS mount info
3 participants