-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
fix copy module update atime/mtime #83235
base: devel
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create a changelog fragment.
@mkrizek I created fragment file. |
@flowerysong @s-hertel @mkrizek PTAL? |
@dkuji Sorry, this is still in my queue. I'm kind of concerned how easy it seems like it would be to accidentally lose the test coverage. I still haven't understood how to reliably reproduce the issue (for example, I was able to tweak your test to use the full path, and reproduce, so it's not limited to relative paths). Even though the test is destructive, I think the test should use the remote_tmp_dir if possible for easy cleanup. The |
Thanks for your comment! This is because src is a path like /root/.ansible/tmp/ansible-tmp-1717499708.7618713-470-18776907546337/.source.txt, and the file system is the same for src and dest. However, if you use {{ remote_dir }} in dest, dest will be under /tmp/, and the file system will be different, so it cannot be reproduced. This is the result of a df in a container that starts when you run the following command: # ansible-test integration copy --docker alpine319 --python 3.11 ~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 61202244 15380100 42680820 26% /
tmpfs 65536 0 65536 0% /dev
shm 65536 164 65372 0% /dev/shm
tmpfs 4016028 16 4016012 0% /tmp
tmpfs 4016028 28 4016000 0% /run
/dev/vda1 61202244 15380100 42680820 26% /etc/resolv.conf
/dev/vda1 61202244 15380100 42680820 26% /etc/hostname
/dev/vda1 61202244 15380100 42680820 26% /etc/hosts
tmpfs 4016028 0 4016028 0% /run/lock
tmpfs 4016028 0 4016028 0% /sys/fs/cgroup
tmpfs 65536 0 65536 0% /proc/kcore
tmpfs 65536 0 65536 0% /proc/keys
tmpfs 65536 0 65536 0% /proc/timer_list
tmpfs 4016028 0 4016028 0% /sys/firmware I understand the idea that I should use {{ remote_dir }} for easier cleanup, but I don't know how to reproduce it using {{ remote_dir }}. |
SUMMARY
ISSUE TYPE
copy module: modify time on the file (mtime) is not updating #83013
ADDITIONAL INFORMATION