os.rename causes rabbitmq-server charm to fail if /tmp and /etc sit on different partitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack RabbitMQ Server Charm |
Fix Released
|
Low
|
David Ames |
Bug Description
Using latest charm from cs:rabbitmq-server
Ubuntu Xenial distro
When deployed, charm is failing at config-changed hook with:
Traceback (most recent call last):
File "./hooks/
hooks.
File "/var/lib/
self.
File "/var/lib/
f(*args, **kwargs)
File "/var/lib/
return f(*args, **kwargs)
File "./hooks/
rabbit.
File "/var/lib/
os.
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmplitmyyi7' -> '/etc/hosts'
os.rename do not work if we have source and destination sitting on different partitions.
Digging on this error, I've found:
Following: https:/
Which basically replaces os.rename for shutil.move function.
Manually applying this same change fixed the problem and rerunning the hook fixed the issue.
Changed in charm-rabbitmq-server: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: cpe-onsite |
Changed in charm-rabbitmq-server: | |
assignee: | nobody → David Ames (thedac) |
milestone: | none → 19.10 |
Changed in charm-rabbitmq-server: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. opendev. org/680494
Review: https:/