Bug 1005432

Summary: Wrong path for lxc global config
Product: [Fedora] Fedora Reporter: Ranjib Dey <dey.ranjib>
Component: lxcAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: dey.ranjib, karlthered, mhw, sagarun, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-14 06:57:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ranjib Dey 2013-09-06 22:32:36 UTC
Description of problem:

/usr/share/lxc/lxc.functions uses /etc/lxc/lxc.conf (for grepping lxc template path) as global lxc config. It is sourced by lxc-clone bash script (which uses set -e). current lxc rpm ships the global template as /etc/lxc/default.conf. Which causes the grep inside lxc.functions to return non zero, failing the whole clone operation, without any error.

Version-Release number of selected component (if applicable): lxc0.9.0-1.fc21.x86_64

Comment 1 Thomas Moschny 2013-09-09 18:12:00 UTC
The two files serve a different purpose: /etc/lxc/default.conf is the
default configuration for a fresh container, while /etc/lxc/lxc.conf is
a configuration file with settings used by the scripts and binaries
directly.

However, LXC currently does not ship the latter. If lxc-clone fails due
to a non-existent /etc/lxc/lxc.conf that should be fixed: The
get_default_lxcpath() method probably needs an additional if [ -r
"$globalconf" ] ; then ...  fi construct.

Would you mind sending a patch fixing this to the lxc-devel list? The
patch should be against 0.9.0 though (and thus probably applied on a
branch for that version), as in the current staging branch lxc-clone has
been replaced by C code as far as I can see.

Comment 2 Michael H. Warfield 2014-06-04 21:02:51 UTC
Can this be verified against the 1.0.0 branch?  If not, it's going to be a "will not fix".  The fix will be to upgrade.  If it's still a problem, the 1.0.0 branch will be fixed and this will still be a "will not fix" against 0.9.0.

Comment 3 Thomas Moschny 2014-08-08 10:37:48 UTC
Please check whether the problem is still available with lxc-1.0.5-2.fc22.

Comment 4 Thomas Moschny 2014-09-14 06:57:01 UTC
Closing, please re-open if the problem persists.