Bug 217046 - net/ceph-devel: Development version for Ceph, a distributed object, block, and file storage platform
Summary: net/ceph-devel: Development version for Ceph, a distributed object, block, an...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Mahdi Mokhtari
URL: https://reviews.freebsd.org/D9584
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-12 18:34 UTC by Willem Jan Withagen
Modified: 2017-03-30 11:54 UTC (History)
3 users (show)

See Also:


Attachments
ceph-devel shar file for port (20.49 KB, text/plain)
2017-02-12 18:34 UTC, Willem Jan Withagen
no flags Details
ceph-devel shar file for port (v2) (20.49 KB, text/plain)
2017-02-13 11:48 UTC, Willem Jan Withagen
no flags Details
Revied version of the new port submission (20.55 KB, text/plain)
2017-03-13 16:07 UTC, Willem Jan Withagen
no flags Details
Previous patch with minor changes (21.72 KB, patch)
2017-03-17 17:10 UTC, Mahdi Mokhtari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Willem Jan Withagen 2017-02-12 18:34:46 UTC
Created attachment 179915 [details]
ceph-devel shar file for port

First version of a port for Ceph to FreeBSD.
This is based on development code.

Once a new major version is released (Luminous), there will also be a ceph-port based on the release schedule of Ceph.
Comment 1 outbackdingo 2017-02-13 02:10:35 UTC
Hi, I believe at a minimum the shar when extracted should create a directory for ceph-devel and the files inside it.
Comment 2 Willem Jan Withagen 2017-02-13 11:48:00 UTC
Created attachment 179945 [details]
ceph-devel shar file for port (v2)

This time a .shar with ceph-devel prefixed
Comment 3 Alan Somers freebsd_committer freebsd_triage 2017-02-13 16:36:10 UTC
Why are there so many commented fields near the top of the Makefile?

Is git really a BUILD_DEPEND?  If anything, it's usually a FETCH_DEPEND.  But if you're using USE_GITHUB, I think that's implied.

What is OTHER_DEPENDS?  I've never seen that before.

TEST_DEPENDS, and all of the other commented out code, should be removed.

Have you tried building with Poudriere?  If you're missing any dependencies, Poudriere will find out.  It'll also catch any errors in your pkg-plist.

Likewise, you should try using portlint.  It'll catch some of the stuff that I did.

Some comments have > 80 chars/line.  Please shorten them.

Do you need to specify GH_ACCOUNT when you're using GH_TUPLE?

s/atleast/at least/

Please don't manually specify "-j" to gmake.  It prevents ports/poudriere from managing the number of jobs.  Instead, just say "INSTALL_WRKSRC=${WRKSRC}/build".

Is it really necessary to put all the MKDIRs in post-stage:?  I thought the @dir directive in pkg-plist was sufficient.

In post-stage: don't use CP for init-ceph.  Instead, use INSTALL so you can set the mode correctly.  I think it's also more common to do that kind of thing in post-install, though post-stage will also work.

Why are there @comment lines in the pkg-plist?

Please delete the blank lines at the end of every file.

There's some garbage in line 6 of the pkg-descr file.

The third bullet of pkg-descr is incorrectly indented.

The third paragraph of pkg-descr probably isn't appropriate material for a pkg-descr file, though it satisfies my personal curiosity about why you've put in so much effort.

In files/ceph.in, please put a newline after a leading {

Never hardcode "/usr/local" into an rc script.  Instead, use %%PREFIX%%.  It'll be expanded automatically, thanks to USE_RC_SUBR.

Question:  which components of Ceph have you gotten running on FreeBSD?  I'm assuming the OSD runs.  Can FreeBSD also run an MDS or a Monitor node?

For a port this complicated, it would be easier to review if you open a code review at https://reviews.freebsd.org/.  I think you can login with your github credentials.
Comment 4 Willem Jan Withagen 2017-02-13 20:17:16 UTC
Hi Alan,

Why have portlint, if you are way much more useful in suggestions? ;-)
Thanx for the very detailed review.
I will address your questions/suggestion and more.

The port started out with a different approach so some things are left over. And next to that it is a work in progress, as is the Ceph-port.
So some things are there as a reminder for future things to do.
Otehr thigns are there because the "just seemed to work". Even with the ports handbook I still feel writing a ports fileset is sort of a black art.
And yes, it took me a while to get this portset cooked up.

And yes it runs thru both portlint and poudriere.
poudriere testport complains mainly about work/stage containing all kinds of different files that the ceph install puts there but are mostly used for testing. And I do not want to compilcate the ceph part of the port even more with messing in the install things. If too much time left over, I'll perhaps spend a odd weekend to sort this out.  

I might need some hand holding, but I'll checkout reviews.freebsd.org.

And as to your question what is working/tested in the port:
  Mon
  OSD
  RadosGW
  rados
  rbd
  init-ceph, and etc/rc.d/ceph on top of that
  ceph-disk {prepare, activate}

So all in all enough to build a multi server, multi osd cluster fully running on FreeBSD and do some testing...
I still need to write up some notes on that.

Somethings are still left to the user. :)
I have not tried MDS, but would expect that not to be anything harder that getting MONs and OSDs ported. There is also the (lib)cephfs that needs attention. And my personal interest is in getting RBD working with bhyve.

--WjW
Comment 5 Willem Jan Withagen 2017-02-14 01:52:36 UTC
Added unmodified to Phabricator:

 https://reviews.freebsd.org/D9584
Comment 6 Willem Jan Withagen 2017-03-13 16:07:22 UTC
Created attachment 180782 [details]
Revied version of the new port submission

This port has been reviewed in:
  https://reviews.freebsd.org/D9584

So hopefully it is now good to go.
Comment 7 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-17 09:04:25 UTC
Took by request,
@Wiliam, nice work indeed, thanks.
I'll do normal QA (poudriere and portlint).
Comment 8 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-17 17:04:18 UTC
(In reply to Mahdi Mokhtari from comment #7)
Portlint is fine.
But poudriere fails at building `rbd_mirror_internal` target.
Also minor changes was needed.
Comment 9 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-17 17:10:45 UTC
Created attachment 180906 [details]
Previous patch with minor changes

Would you please test it builds for you?
Comment 10 Willem Jan Withagen 2017-03-17 20:53:00 UTC
(In reply to Mahdi Mokhtari from comment #9)

1) Sort of discerning that the SHA of ceph-object-corpus-master has changed, because nothing has been committed since early 2014.
Not sure why that is.

2) I explicitly chose to use RelWithDebInfo because this is the first introduction and it will certainly have crashes. And having debugInfo will help debugging.
But if you prefer to use Release, that is fine with me.
Comment 11 Willem Jan Withagen 2017-03-17 22:26:58 UTC
(In reply to Mahdi Mokhtari from comment #9)

Your changes build just fine here.
Both in Poudriere but also in /usr/ports.
The test-set also completes oke.
Comment 12 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-18 08:41:35 UTC
(In reply to Willem Jan Withagen from comment #11)
Thanks for confirming QA.
I'll wait for approval on Review, Then I'll commit it.
Comment 13 commit-hook freebsd_committer freebsd_triage 2017-03-30 10:57:03 UTC
A commit references this bug:

Author: mmokhi
Date: Thu Mar 30 10:55:15 UTC 2017
New revision: 437280
URL: https://svnweb.freebsd.org/changeset/ports/437280

Log:
  net/ceph-devel: Add port to the tree.
  Ceph is a distributed object store and file system designed to
  provide excellent performance, reliability and scalability.

  PR:		217046
  Submitted by:	Willem Jan Withagen <wjw@digiware.nl>
  Reported by:	Willem Jan Withagen <wjw@digiware.nl>
  Reviewed by:	asomers, feld, mat, mmokhi
  Approved by:	asomers, feld (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9584

Changes:
  head/GIDs
  head/UIDs
  head/net/Makefile
  head/net/ceph-devel/
  head/net/ceph-devel/Makefile
  head/net/ceph-devel/distinfo
  head/net/ceph-devel/files/
  head/net/ceph-devel/files/ceph.in
  head/net/ceph-devel/files/patch-src_rocksdb_CMakeLists.txt
  head/net/ceph-devel/pkg-descr
  head/net/ceph-devel/pkg-plist
Comment 14 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-30 11:00:51 UTC
(In reply to commit-hook from comment #13)
Committed, Thanks :-)