log snapshots contain symlinks and not the actual files

Bug #1628201 reported by Alex Schultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
In Progress
High
Timmy Development Team

Bug Description

I pulled a recent snapshot bundle from a CI failure and the astute.yaml files provided in the configs tarbal are symlinks and not the actual files. This makes it very hard to understand what configuration was used when the nodes were deployed.

https://ci.fuel-infra.org/job/master.fuel-library.pkgs.ubuntu.smoke_neutron/8004/

The fuel-snapshot-2016-09-27_15-56-05/files/cluster-1/node-1-10.109.0.6/etc/astute.yaml is a symlink to /etc/fuel/cluster/1/astute.yaml which does not exist.

Same is also true for resolv.conf

Changed in fuel:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Georgy Kibardin (gkibardin)
milestone: none → 10.0
tags: added: area-python timmy
Changed in fuel:
assignee: Georgy Kibardin (gkibardin) → Timmy Development Team (timmy-core)
Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

I believe this has been fixed a while ago (for astute.yaml), please let know if there's anything else missing. Symlinks are not converted to files still, but we added collection of files backing the links (such as /var/lib/fuel/ folder)

Changed in fuel:
status: Confirmed → Fix Released
Revision history for this message
Alex Schultz (alex-schultz) wrote :

Not fixed. please check a snapshot https://ci.fuel-infra.org/job/master.fuel-library.pkgs.ubuntu.smoke_neutron/8538/ they are still symlinks

Changed in fuel:
status: Fix Released → Confirmed
Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

Which symlinks do not have backing files? Symlinks should be where they are, we do not convert symlinks to files. Instead we collect the files which we know we have symlinks for, such as astute.yaml.

Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

If there's need to access files in a snapshot by some automation via symlinks which have absolute paths you can use some symlink conversion approach, like described here - http://unix.stackexchange.com/a/100955.

In the snapshot we preserve the state of files, including symlinks.

Please provide a list of symlinks needed for your purposes for which there are no destination files in the snapshot.

Revision history for this message
Alex Schultz (alex-schultz) wrote :

I see astute.yaml does exist, but resolv.conf is not captured for any of the other hosts besides the fuel master. I'm not sure preserving the symlinks out weighs the need to actually have the contents of the file. It would be more beneficial to capture the file and then also create a <filename>.symlink with the target as contents.

Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

You test with timmy 1.20.3, correct? I can see resolv.conf in snapshots:
https://ci.fuel-infra.org/job/master.fuel-library.pkgs.ubuntu.smoke_neutron/8538/artifact/logs/8538/pass_setup_master-fuel-snapshot-2016-11-14_14-15-19.tar - present in config.tzr.gz -> files -> fuel -> etc
https://ci.fuel-infra.org/job/master.fuel-library.pkgs.ubuntu.smoke_neutron/8538/artifact/logs/8538/pass_prepare_slaves_3-fuel-snapshot-2016-11-14_14-25-53.tar - same path, present for fuel and the rest of the nodes. It's a file, not a symlink.

Please tell which resolv.conf is missing and in which archive?

Regarding converting symlinks to files - I don't like this idea as it would both complicate the code and make collected data look unusual for someone not informed about such specifics.

Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

example - resolv.conf for node-3

Revision history for this message
Alex Schultz (alex-schultz) wrote :

I'm just reporting what's available via the CI. For example, I used https://ci.fuel-infra.org/job/master.fuel-library.pkgs.ubuntu.smoke_neutron/8538/artifact/logs/8538/pass_deploy_neutron_tun-fuel-snapshot-2016-11-14_15-32-40.tar

4:45 PM ☁ fuel-snapshot-2016-11-14_15-32-40 ➜ find . -name 'resolv.conf' -type l
./files/cluster-1/node-2-10.109.36.6/etc/resolv.conf
./files/cluster-1/node-1-10.109.36.5/etc/resolv.conf
./files/cluster-1/node-3-10.109.36.4/etc/resolv.conf
4:45 PM ☁ fuel-snapshot-2016-11-14_15-32-40 ➜ find . -name 'resolv.conf' -type f
./files/fuel/etc/resolv.conf
4:45 PM ☁ fuel-snapshot-2016-11-14_15-32-40 ➜

The node's resolv.conf are symlinks to ../run/resolvconf/resolv.conf

Just capture files please. Symlinks are not that helpful when trying to see if a file has the proper configuration.

Revision history for this message
Alex Schultz (alex-schultz) wrote :

What would be better is to have an option to copy symlinks (like rsync's -l) to allow for both methods. Either way, as far as I'm concerned I only care about the files and I would like the CI to properly capture files and not symlinks. For usages outside of this case, I don't have an opinion on the symlink thing however I think that should be up to the end user to decide what they want.

Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

An option sounds feasible, I will try to implement that.

Looks like the issue with current setting appeared due to nodes being Xenial and using systemd - we have not tested Timmy against Xenial nodes. Is this for MOS 10 or MOS 9.2?

I will also add /run/resolvconf/resolv.conf into collection list.

Revision history for this message
Dmitry Sutyagin (dsutyagin) wrote :

Changes on review upstream:
https://review.openstack.org/397451 - add rsync options as config parameter

I kept defaults the same, so if you need to collect symlinks as files - create a config and define rsync_opts analogous to what's in conf.py but with the extra -L flag. Pass config to timmy via "-c" option. Config should be in yaml format, rsync_opts should be a list, so the file should look like so:

rsync_opts:
  - '-azL'

https://review.openstack.org/397452 - collect /run/resolvconf/resolv.conf

I'm not sure when we'll update the downstream package though, this process is quite tedious. Hopefully by the end of this week we'll push an updated package with all the changes introduced since 9.1 release.

Changed in fuel:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.