2 Replies Latest reply on Mar 9, 2012 7:52 AM by amitsaha

    Post-first appliance queries

    amitsaha

      Hello: This is my first post here and comes shortly after I built my first appliance with BoxGrinder - and hopefully an useful one too - an ownCloud appliance. I have detailed the steps in my blog post here. I faced a couple of issues while at it and those are ones I would like expert opinion on: (My appliance definition file is here)

       

      1. I ran into random unmounting problems, and James Martin's post < a href="https://issues.jboss.org/browse/BGBUILD-343?focusedCommentId=12662863&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12662863">here helped me overcome it.
      2. When I had a command like '/sbin/chkconfig httpd' in the 'post' section of my appliance definition, I ran into these errors:

       

      /sbin/chkconfig httpd on
      T, [2012-02-26T17:39:54.945490 #27749] TRACE -- : GFS: SETARCH_EOF
      T, [2012-02-26T17:39:56.341999 #27749] TRACE -- : GFS: Note: Forwarding request to 'systemctl enable httpd.service'.
      T, [2012-02-26T17:39:56.660481 #27749] TRACE -- : GFS: ln -s '/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
      T, [2012-02-26T17:39:56.697719 #27749] TRACE -- : GFS: umount /sysroot/sys
      T, [2012-02-26T17:39:56.980919 #27749] TRACE -- : GFS: umount /sysroot/proc
      T, [2012-02-26T17:39:57.242118 #27749] TRACE -- : GFS: umount /sysroot/dev
      T, [2012-02-26T17:39:57.490490 #27749] TRACE -- : GFS: guestfsd: error: Note: Forwarding request to 'systemctl enable httpd.service'.
      ln -s '/li
      T, [2012-02-26T17:39:57.491995 #27749] TRACE -- : GFS: b/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
      D, [2012-02-26T17:39:57.493935 #27749] DEBUG -- : GFS: sh = NULL (error)
      

       

      Any ideas what might be going wrong here? Many thanks in advance.

        • 1. Re: Post-first appliance queries
          goldmann

          Hi Amit,

           

          Instead of relying on systemctl for enabling services on boot, just symlink the required files on your own:

           

          post:
            base:
              - "ln -s '/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'"
          

           

          I'm still unsure why systemctl is failing, but I saw this earlier too.

           

          --Marek

          1 of 1 people found this helpful
          • 2. Re: Post-first appliance queries
            amitsaha

            Thanks a lot Marek for your reply. I will give this a shot!