Merge ~lvoytek/ubuntu/+source/mysql-8.0:mysql-fix-my-cnf-symlink-apport into ubuntu/+source/mysql-8.0:ubuntu/devel
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | e417d5e8ba04504a15491283ba64d82496f60542 | ||||
Proposed branch: | ~lvoytek/ubuntu/+source/mysql-8.0:mysql-fix-my-cnf-symlink-apport | ||||
Merge into: | ubuntu/+source/mysql-8.0:ubuntu/devel | ||||
Diff against target: |
34 lines (+14/-1) 2 files modified
debian/additions/source_mysql-8.0.py (+7/-1) debian/changelog (+7/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robie Basak | Approve | ||
Canonical Server | Pending | ||
Canonical Server Core Reviewers | Pending | ||
Review via email: mp+422034@code.launchpad.net |
Description of the change
When apport bugs are submitted for mysql with the default config, it will display my.cnf with
Error: [Errno 40] Too many levels of symbolic links: '/etc/mysql/my.cnf'
which can be an issue when trying to diagnose the actual problem.
This update shows what my.cnf links to if it is linked otherwise it will show the file customized by the user.
To test:
# lxc launch images:
# lxc exec test-kinetic bash
# apt update && apt dist-upgrade -y
# apt install apport mysql-server software-
# ubuntu-bug mysql-server
V
- Under the my.cnf section the too many symbolic links error will be shown
C
# add-apt-repository ppa:lvoytek/
- If 8.0.29-0ubuntu1 hasn't been released then enable proposed before updating
# apt update && apt upgrade -y
# export APPORT_
- Check default config
# ubuntu-bug mysql-server
V
- The my.cnf section will now show "MySQLConf.
C
- Check custom config
# rm /etc/mysql/my.cnf
# cp /etc/mysql/
# ubuntu-bug mysql-server
V
- The my.cnf section will now show the contents of the file
C
Looks good, with an inline suggestion.
FTR, I looked up why there was a problem in the first place. Looks like apport. hookutils. read_file( ) uses os.open(..., os_O_NOFOLLOW) so it's intentional that it doesn't follow symlinks. I found that surprising, but I guess it does make sense to report the symlink target in this case instead, so doing it in the mysql-server apport hook works.