postinst syntax error, if condition without "then", and directory path error (Ceph 9.2.0 only)

Bug #1544647 reported by guessi
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ceph (Ubuntu)
Fix Released
High
James Page

Bug Description

in ceph-mds.postinst,

Line 35: if ! dpkg-statoverride --list /var/lib/ceph/mds >/dev/null
Line 36: chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/mds
Line 37: fi

should be,

Line 35: if ! dpkg-statoverride --list /var/lib/ceph/bootstrap-mds >/dev/null; then
Line 36: chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/bootstrap-mds
Line 37: fi

there are 2 bugs need to be corrected,
1. syntax error, missing "then"
2. path error, target directory path should be "/var/lib/ceph/bootstrap-mds"

reproduce step,
1. boot fresh new Ubuntu Trusty (with cloudarchive:mitaka), or Ubuntu Xenial (any version of daily build)
2. apt-get update
3. apt-get install ceph-common (or ceph-mds only)
4. installation should block while processing ceph-mds.postinst

Revision history for this message
guessi (guessi) wrote :
no longer affects: ceph
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ceph-mds.postinst.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
James Page (james-page)
Changed in ceph (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → James Page (james-page)
milestone: none → ubuntu-16.02
Revision history for this message
James Page (james-page) wrote :

ceph-mds only need to take care of the mds folder; bootstrap-mds is done by the ceph package.

Fix committed to git repo.

Changed in ceph (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 9.2.0-0ubuntu5

---------------
ceph (9.2.0-0ubuntu5) xenial; urgency=medium

  [ guessi ]
  * d/ceph-mds.postinst: Fixup syntax error (LP: #1544647).

 -- James Page <email address hidden> Tue, 16 Feb 2016 12:54:16 +0000

Changed in ceph (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
guessi (guessi) wrote :

Hi,

the first issue, syntax error was fixed, thanks!

but the path error still there, when it is trying to setup "ceph-mds", it says,

---
Setting up ceph-mds (9.2.0-0ubuntu5) ...
chown: cannot access ‘/var/lib/ceph/mds’: No such file or directory
dpkg: error processing package ceph-mds (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 ceph-mds
E: Sub-process /usr/bin/dpkg returned an error code (1)
---

as you said, bootstrap-mds have done by "ceph.postinst",
there is a for loop out for finding sub-folder path, so it won't hit the path problem,
but "ceph-mds.postinst" not, it still trying to "chown" on a non-exist folder,
seems like we could to remove section of "bootstrap-mds"?

or wrap it in `if [ -d /var/lib/ceph/ceph ]; then ...`

Changed in ceph (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
James Page (james-page) wrote :

Ah right - yes I see - will add to my next upload.

Revision history for this message
guessi (guessi) wrote :

thanks for update :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 9.2.0-0ubuntu6

---------------
ceph (9.2.0-0ubuntu6) xenial; urgency=medium

  * d/ceph-mds.dirs: Actually create /var/lib/ceph/mds prior to changing
    permissions (LP: #1544647).
  * d/ceph.init: Restore link to init-ceph, resolving un-install failures
    due to missing init script (LP: #1546112).

 -- James Page <email address hidden> Wed, 17 Feb 2016 10:33:24 +0000

Changed in ceph (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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