You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by wido <gi...@git.apache.org> on 2016/05/12 13:42:09 UTC

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

GitHub user wido opened a pull request:

    https://github.com/apache/cloudstack/pull/1541

    Systemd packaging for Ubuntu 16.04

    This PR is for introducing packaging for Ubuntu 16.04
    
    Ubuntu 14.04 still uses sysvinit and Java 7. 16.04 uses systemd and Java 8.
    
    The 'build-deb.sh' script can be used to generate packages. The comments in the file show how to use Docker to build for the different versions of Ubuntu.
    
    I've just build:
    * cloudstack-agent_4.9.0-SNAPSHOT~xenial_all.deb
    * cloudstack-agent_4.9.0-SNAPSHOT~trusty_all.deb

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wido/cloudstack systemd-ubuntu1604

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1541.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1541
    
----
commit 6fa05801d828971f7ac76ae028fa304c2bc4cc8f
Author: Wido den Hollander <wi...@widodh.nl>
Date:   2016-04-28T18:59:30Z

    systemd: Add a /etc/sysconfig/cloudstack-* file
    
    This allows users to easily override variables passed to Java when
    starting up.
    
    It also creates a foundation for sharing the systemd service profile
    between CentOS and Ubuntu since it only requires the environment file
    to be changed.

commit 61157ece4174baf38e331ec26ce09b79e5c49254
Author: Wido den Hollander <wi...@widodh.nl>
Date:   2016-04-29T08:12:24Z

    deb: Drop Ubuntu 12.04 support
    
    The libvirt and Qemu versions (1.2.2 and 2.0) in Ubuntu 12.04 are
    to old to support for CloudStack going forward.
    
    Ubuntu 14.04 and 16.04 provide the support required to provide new
    features and more stability.

commit be2cd066919854627fa8456398abd46d1748075b
Author: Wido den Hollander <wi...@widodh.nl>
Date:   2016-04-28T19:42:31Z

    deb: Add Ubuntu 16.04 support
    
    Ubuntu 16.04 differs from Ubuntu 14.04 in a few ways:
    - systemd instead of sysvinit / upstart
    - Java 8 support
    
    The packaging now detects on which distribution it is being
    build and based on that it installs different files in the
    packages, but it also changes the Dependencies.
    
    Packages for Ubuntu 16.04 will require Java 8 as a JRE

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Except the extra `--with systemd`, LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido closed the pull request at:

    https://github.com/apache/cloudstack/pull/1541


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian repo: http://packages.shapeblue.com/cloudstack/pr/1541
    Job ID #67


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r63150289
  
    --- Diff: debian/cloudstack-agent.install ---
    @@ -18,12 +18,11 @@
     /etc/cloudstack/agent/agent.properties
     /etc/cloudstack/agent/environment.properties
     /etc/cloudstack/agent/log4j-cloud.xml
    +/etc/default/cloudstack-agent
     /etc/profile.d/cloudstack-agent-profile.sh
     /etc/logrotate.d/cloudstack-agent
    -/etc/init.d/cloudstack-agent
     /usr/bin/cloudstack-setup-agent
    --- End diff --
    
    Yes, that is true. I 'stole' this from other packages which still do the same.
    
    In debian/rules I would have to make the decision to install these or not, but I wasn't really sure how to do so.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73830805
  
    --- Diff: debian/control ---
    @@ -3,7 +3,7 @@ Section: libs
     Priority: extra
     Maintainer: Wido den Hollander <wi...@widodh.nl>
     Build-Depends: debhelper (>= 9), openjdk-8-jdk | openjdk-7-jdk, genisoimage,
    - python-mysql.connector, maven (>= 3) | maven3, python (>= 2.7)
    + python-mysql.connector, maven (>= 3) | maven3, python (>= 2.7), lsb-release
    --- End diff --
    
    @vincentbernat that should be okay, we can use Xenial to build pkgs for both Xenial and Precise. At some point we'll need to stop building packages for Precise.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73830801
  
    --- Diff: debian/rules ---
    @@ -116,17 +132,24 @@ override_dh_auto_install:
     
     	# cloudstack-usage
     	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage
    -	mkdir $(DESTDIR)/var/log/$(PACKAGE)/usage
     	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage
     	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage/plugins
     	install -D usage/target/cloud-usage-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar
     	install -D usage/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/
     	cp usage/target/transformed/db.properties $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/
     	cp usage/target/transformed/log4j-cloud_usage.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/log4j-cloud.xml
    -	install -D packaging/debian/init/cloud-usage $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-usage
    +
    +	install -d -m0755 debian/$(PACKAGE)-usage/etc/init.d
    +	install -D -m0755 packaging/debian/$(PACKAGE)-usage.init debian/$(PACKAGE)-usage/etc/init.d/$(PACKAGE)-usage
    +	install -d -m0755 debian/$(PACKAGE)-usage/lib/systemd/system
    +	install -m0644 packaging/debian/$(PACKAGE)-usage.service debian/$(PACKAGE)-usage/lib/systemd/system/$(PACKAGE)-usage.service
    +	install -m0644 packaging/debian/$(PACKAGE)-usage.default $(DESTDIR)/$(SYSCONFDIR)/default/$(PACKAGE)-usage
     
     override_dh_installinit:
     	dh_installinit -pcloudstack-management -pcloudstack-agent -pcloudstack-usage --onlyscripts --no-start
     
    +override_dh_systemd_enable:
    +	dh_systemd_enable -pcloudstack-agent -pcloudstack-usage
    +
    --- End diff --
    
    This bit needs the `--with systemd` bit mentioned above.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @wido can you apply the PR on 4.9/master and fix build? I got following failures. It would be great if this PR can opened for 4.9. Thanks.
    
    Error from Jenkins build:
       dh_install
    dh_install: cloudstack-agent missing files: /etc/init.d/cloudstack-agent
    dh_install: cloudstack-usage missing files: /etc/init.d/cloudstack-usage
    dh_install: missing files, aborting
    debian/rules:15: recipe for target 'binary' failed
    make: *** [binary] Error 255
    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
    Build step 'Execute shell' marked build as failure
    Finished: FAILURE


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @vincentbernat Thanks! Good pointers. I will look into those.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @wido I've used your PR to create this new branch on asf remote (so we both and anyone else can collaborate) and this PR: #1647 -- let's close this PR and continue on the new one against 4.9 branch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73830557
  
    --- Diff: debian/control ---
    @@ -3,7 +3,7 @@ Section: libs
     Priority: extra
     Maintainer: Wido den Hollander <wi...@widodh.nl>
     Build-Depends: debhelper (>= 9), openjdk-8-jdk | openjdk-7-jdk, genisoimage,
    - python-mysql.connector, maven (>= 3) | maven3, python (>= 2.7)
    + python-mysql.connector, maven (>= 3) | maven3, python (>= 2.7), lsb-release
    --- End diff --
    
    For systemd integration, you need to Build-Depends on dh-systemd. Unfortunately, this will make the package unbuildable on Precise. See below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @blueorangutan package


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    I pushed a new version of the commits, could @rhtyd and @vincentbernat take a look?
    
    Yes, Ubuntu 12.04 is dropped, but I did that earlier. See my commits. It will go EOL in April next year, but libvirt and Qemu are already far to old to use any way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-218945458
  
    @wido thanks, much needed. I had a quick look, I could not find a cloudstack-management.sysconfig.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @rhtyd That's a total merge hell with all the version number conflicts in the pom.xml files.
    
    This PR has been open since May this year, far before 4.9 was even cut.
    
    Can't we merge it into master and cherry-pick back to 4.9?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73830916
  
    --- Diff: debian/cloudstack-agent.install ---
    @@ -18,12 +18,11 @@
     /etc/cloudstack/agent/agent.properties
     /etc/cloudstack/agent/environment.properties
     /etc/cloudstack/agent/log4j-cloud.xml
    +/etc/default/cloudstack-agent
     /etc/profile.d/cloudstack-agent-profile.sh
     /etc/logrotate.d/cloudstack-agent
    -/etc/init.d/cloudstack-agent
     /usr/bin/cloudstack-setup-agent
    --- End diff --
    
    @wido can we also move the debian directory to packaging folder? The deb files are build at `..` which is the parent folder of the cloudstack repo/source code, and causes issues when doing concurrent builds using Jenkins.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-218957622
  
    I was able to build the packages on Ubuntu 16.04:
    cloudstack-agent_4.9.0-SNAPSHOT~xenial_all.deb  cloudstack-common_4.9.0-SNAPSHOT~xenial_all.deb  cloudstack-management_4.9.0-SNAPSHOT~xenial_all.deb
    cloudstack-cli_4.9.0-SNAPSHOT~xenial_all.deb    cloudstack-docs_4.9.0-SNAPSHOT~xenial_all.deb    cloudstack-usage_4.9.0-SNAPSHOT~xenial_all.deb
    
    I was able to deploy-database using cloudstack-setup-databases but I was unable to setup management server. It failed with following: (I tried fixing the tomcat user and configs in the initd script but that did not help either)
    
    -- Unit cloudstack-management.service has begun starting up.
    May 13 11:15:09 antrix.scaleninja.com cloudstack-management[19721]:  * cloudstack-management is not installed
    May 13 11:15:09 antrix.scaleninja.com systemd[1]: cloudstack-management.service: Control process exited, code=exited status=1
    May 13 11:15:09 antrix.scaleninja.com systemd[1]: Failed to start LSB: Start Tomcat (CloudStack)..
    -- Subject: Unit cloudstack-management.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit cloudstack-management.service has failed.
    -- 
    -- The result is failed.
    May 13 11:15:09 antrix.scaleninja.com systemd[1]: cloudstack-management.service: Unit entered failed state.
    May 13 11:15:09 antrix.scaleninja.com systemd[1]: cloudstack-management.service: Failed with result 'exit-code'.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-219015333
  
    @wido I'm LGTM on agent and usage package, it's a good first steps. Though, I also want to see mgmt server as well. For enabling the services, we can have some sort of systemctl enable <service> in the post installation scripts; or in cloudstack-setup-{agent,management} etc.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @wido can you reopen or edit the PR for base branch 4.9? Let's get this merged, as we'll need to support Ubuntu 16.04 for our LTS release.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73830730
  
    --- Diff: debian/rules ---
    @@ -5,9 +5,18 @@ PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1)
     SYSCONFDIR = "/etc"
     DESTDIR = "debian/tmp"
     
    +ifeq ($(shell lsb_release -sr), 14.04)
    +        SUBSTVARS = -Vjre:Depends="openjdk-7-jre-headless" -Vjdk:Depends="openjdk-7-jdk" -Vinit:"Depends:jsvc"
    +else
    +        SUBSTVARS = -Vjre:Depends="openjdk-8-jre-headless" -Vjdk:Depends="openjdk-8-jdk" -Vinit:"Depends:systemd"
    +endif
    +
     %:
     	dh $@ --with python2
    --- End diff --
    
    You need to do `--with python2,systemd`. Otherwise, systemd unit won't be enabled automatically and the integration won't happen (no restart of the service on upgrade for example).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r74198886
  
    --- Diff: debian/rules ---
    @@ -136,5 +156,8 @@ override_dh_auto_install:
     override_dh_installinit:
     	dh_installinit -pcloudstack-management -pcloudstack-agent -pcloudstack-usage --onlyscripts --no-start
     
    +override_dh_systemd_enable:
    +	dh_systemd_enable -pcloudstack-agent -pcloudstack-usage --with systemd
    --- End diff --
    
    I didn't mean the `--with systemd` to be here, just on the `dh` invocation in the `%` target (like it now is).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian repo: http://packages.shapeblue.com/cloudstack/pr/1541
    Job ID-79


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-218980350
  
    Tested installation and started cloudstack-usage that seems to be working as well:
    
    ```
    root@antrix:/var/log/cloudstack/agent# systemctl status cloudstack-usage
    \u25cf cloudstack-usage.service - CloudStack Usage Server
       Loaded: loaded (/lib/systemd/system/cloudstack-usage.service; disabled; vendor preset: enabled)
       Active: active (running) since Fri 2016-05-13 13:47:14 IST; 969ms ago
    
    $ cat usage.log
    ...
    DEBUG [cloud.usage.UsageManagerImpl] (main:null) (logid:) Checking to see if usage.vmops.pid exists.
    INFO  [cloud.usage.UsageManagerImpl] (main:null) (logid:) Implementation Version is 4.9.0-SNAPSHOT
    INFO  [cloud.usage.UsageServer] (main:null) (logid:) UsageServer ready...
    
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-218978125
  
    @rhtyd Forgot to mention, I didn't fix the MGMT server yet. Tomcat is a bit scary to me.
    
    I only worked on the Agent mainly. I think that is the highest prio for most users right now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-218980050
  
    @wido alright, but while we're at it let's see if we can fix the mgmt server as well.
    
    I tested agent and was able to perform setup:
    
    ```
    root@antrix:/home/bhaisaab/Lab/apache/deb# cloudstack-setup-agent -m localhost -z 1 -p 1 -c 1 -t kvm -g uuid-some -a --pubNic=enp0s31f6 --guestNic=enp0s31f6 --prvNic=enp0s31f6
    Starting to configure your system:
    Configure Apparmor ...        [OK]
    Configure Network ...         [OK]
    Configure Libvirt ...         [OK]
    Configure Firewall ...        [OK]
    Configure Nfs ...             [OK]
    Configure cloudAgent ...      [OK]
    CloudStack Agent setup is done!
    
    root@antrix:/var/log/cloudstack/agent# cat agent.log 
    2016-05-13 13:44:54,336 INFO  [cloud.agent.AgentShell] (main:null) (logid:) Agent started
    2016-05-13 13:44:54,337 INFO  [cloud.agent.AgentShell] (main:null) (logid:) Implementation Version is 4.9.0-SNAPSHOT
    2016-05-13 13:44:54,339 INFO  [cloud.agent.AgentShell] (main:null) (logid:) agent.properties found at /etc/cloudstack/agent/agent.properties
    2016-05-13 13:44:54,341 INFO  [cloud.agent.AgentShell] (main:null) (logid:) Defaulting to using properties file for storage
    2016-05-13 13:44:54,343 INFO  [cloud.agent.AgentShell] (main:null) (logid:) Defaulting to the constant time backoff algorithm
    
    root@antrix:/var/log/cloudstack/agent# systemctl status cloudstack-agent
    \u25cf cloudstack-agent.service - CloudStack Agent
       Loaded: loaded (/lib/systemd/system/cloudstack-agent.service; disabled; vendor preset: enabled)
       Active: active (running) since Fri 2016-05-13 13:46:43 IST; 1s ago
    
    ```
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-218761024
  
    Asking @rhtyd for a review


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Done @rhtyd , it should build now


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r74199703
  
    --- Diff: debian/rules ---
    @@ -136,5 +156,8 @@ override_dh_auto_install:
     override_dh_installinit:
     	dh_installinit -pcloudstack-management -pcloudstack-agent -pcloudstack-usage --onlyscripts --no-start
     
    +override_dh_systemd_enable:
    +	dh_systemd_enable -pcloudstack-agent -pcloudstack-usage --with systemd
    --- End diff --
    
    Ah, understood! Fixed and pushed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73830499
  
    --- Diff: debian/cloudstack-agent.install ---
    @@ -18,12 +18,11 @@
     /etc/cloudstack/agent/agent.properties
     /etc/cloudstack/agent/environment.properties
     /etc/cloudstack/agent/log4j-cloud.xml
    +/etc/default/cloudstack-agent
     /etc/profile.d/cloudstack-agent-profile.sh
     /etc/logrotate.d/cloudstack-agent
    -/etc/init.d/cloudstack-agent
     /usr/bin/cloudstack-setup-agent
    --- End diff --
    
    You can keep the init.d file for everybody. If the the system is running systemd, a service with the same basename will override the init.d file.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Thank you @vincentbernat, I applied your fixes. Can you take a look?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @wido if this helps you I can port your PR to 4.9 and push on asf remote so we can work on it together? Cherry-picking to 4.9 would against cause conflicts, and nice we've a fwd-merging based workflow, it would mess up the git-history/graph the next time someone fwd-merged 4.9 to master after this is cherry-picked to 4.9.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541#issuecomment-219012402
  
    ok @rhtyd ! Let's look at the Agent and Usage first. When they work as they should I'll look at the MGMT server.
    
    The packages work fine on my Ubuntu 14.04 and 16.04 systems.
    
    One thing, the systemd service is not enabled by default. Should we do that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Build system did not have dh-systemd pkg installed, rekicked build job.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @blueorangutan package


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Packaging result: \u2714centos6 \u2714centos7 \u2716debian repo: http://packages.shapeblue.com/cloudstack/pr/1541


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r63148448
  
    --- Diff: debian/cloudstack-agent.install ---
    @@ -18,12 +18,11 @@
     /etc/cloudstack/agent/agent.properties
     /etc/cloudstack/agent/environment.properties
     /etc/cloudstack/agent/log4j-cloud.xml
    +/etc/default/cloudstack-agent
     /etc/profile.d/cloudstack-agent-profile.sh
     /etc/logrotate.d/cloudstack-agent
    -/etc/init.d/cloudstack-agent
     /usr/bin/cloudstack-setup-agent
    --- End diff --
    
    The built deb package still included and install cloudstack-agent initd script at /etc/init.d/cloudstack-agent and same thing happened with cloudstack-usage script. For running them with systemd, are they required? Removing them from *.install file still included them in the package.
    
    dpkg -c <deb file>
    ```
    ...
    drwxr-xr-x root/root         0 2016-05-13 10:00 ./etc/cloudstack/
    drwxr-xr-x root/root         0 2016-05-13 10:00 ./etc/cloudstack/agent/
    -rwxr-xr-x root/root      6529 2016-05-13 10:00 ./etc/cloudstack/agent/agent.properties
    -rwxr-xr-x root/root       906 2016-05-13 10:00 ./etc/cloudstack/agent/environment.properties
    -rwxr-xr-x root/root      3543 2016-05-13 10:00 ./etc/cloudstack/agent/log4j-cloud.xml
    drwxr-xr-x root/root         0 2016-05-13 10:00 ./etc/init.d/
    -rwxr-xr-x root/root      4993 2016-05-13 10:00 ./etc/init.d/cloudstack-agent
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @blueorangutan package


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    Packaging result: \u2714centos6 \u2714centos7 \u2716debian repo: http://packages.shapeblue.com/cloudstack/pr/1541
    Job ID-78


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1541: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1541#discussion_r73848786
  
    --- Diff: debian/cloudstack-agent.install ---
    @@ -18,12 +18,11 @@
     /etc/cloudstack/agent/agent.properties
     /etc/cloudstack/agent/environment.properties
     /etc/cloudstack/agent/log4j-cloud.xml
    +/etc/default/cloudstack-agent
     /etc/profile.d/cloudstack-agent-profile.sh
     /etc/logrotate.d/cloudstack-agent
    -/etc/init.d/cloudstack-agent
     /usr/bin/cloudstack-setup-agent
    --- End diff --
    
    Maybe, never tried that before. Might be possible. But shall we do that in a different PR? Merge this one and then fix that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Systemd packaging for Ubuntu 16.04

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/1541
  
    I just added a README.md to the packaging directory which adds some documentation on how to package CloudStack for DEB and RPM.
    
    I would like to get this done rather soon so that for 4.9 or 4.10 we have Ubuntu 16.04 packages with systemd.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 199
     Hypervisor xenserver
     NetworkType Advanced
     Passed=68
     Failed=5
     Skipped=3
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_vpc_vpn.py
    
     * ContextSuite context=TestRVPCSite2SiteVpn>:setup Failing since 22 runs
    
     * ContextSuite context=TestVpcRemoteAccessVpn>:setup Failing since 22 runs
    
     * ContextSuite context=TestVpcSite2SiteVpn>:setup Failing since 21 runs
    
    * test_volumes.py
    
     * test_06_download_detached_volume Failed
    
    * test_vm_life_cycle.py
    
     * test_10_attachAndDetach_iso Failed
    
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_service_offerings.py
    test_routers_iptables_default_policy.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_snapshots.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_login.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_disk_offerings.py


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    @wido sure I'll spend sometime testing them as well. Since this is packaging only changes, should we get this on 4.9 for the lts /cc @jburwell @karuturi ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

Posted by vincentbernat <gi...@git.apache.org>.
Github user vincentbernat commented on the issue:

    https://github.com/apache/cloudstack/pull/1541
  
    The only change I have noticed is the change in postinst. This could bypass the local administrator policy. It would not restart the agent on upgrade either. I would suggest to :
    
     - Build-Depends on dh-systemd
     - Add --with systemd, python2 do dh invocation
     - Remove the postinst snippet
    
    If you don't want to add a dependency to dh-systemd, the override in debian/rules is useless and the postinst snippet should be more complex. Check for example `/var/lib/dpkg/info/openssh-server.postinst` for the sections `dh_systemd_enable`. Note that there are other snippets in postrm.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---