We're updating the issue view to help you get more done. 

.deb service installer doesn't properly upgrade with dpkg -i

Description

At the end of the process, the bluemarine2 user doesn't exist any longer.
Furthermore, the running service is the old one:

  1. systemctl status bluemarine2-service.service
    ● bluemarine2-service.service - blueMarine II headless service
    Loaded: loaded (/etc/systemd/system/bluemarine2-service.service; enabled)
    Active: active (running) since Tue 2016-12-13 15:01:50 UTC; 5min ago
    Main PID: 832 (java)
    CGroup: /system.slice/bluemarine2-service.service
    └─832 java -DblueMarine2.workspace=/var/lib/bluemarine2 -Dit.tidalwave.bluemarine2.logFolder=/var/log -jar /opt/bluemarine2/bin/../lib/it-tidalwave-bluemarine2-service-1.0-ALPHA-10.jar

See the console log:

dpkg: warning: downgrading bluemarine-ii-headless-service from 1.0+ALPHA+11~SNAPSHOT to 1.0~ALPHA+11
(Reading database ... 33059 files and directories currently installed.)
Preparing to unpack bluemarine2-service-linux-1.0-ALPHA-11.deb ...
Stopping bluemarine2-service...
Removed symlink /etc/systemd/system/multi-user.target.wants/bluemarine2-service.service.
The system user `bluemarine2' already exists. Exiting.
Unpacking bluemarine-ii-headless-service (1.0~ALPHA+11) over (1.0+ALPHA+11~SNAPSHOT) ...
Removing user `bluemarine2' ...
Warning: group `nogroup' has no more members.
Done.
Files under /var/lib/bluemarine2/ not deleted.
Files under /var/cache/bluemarine2/ not deleted.
Setting up bluemarine-ii-headless-service (1.0~ALPHA+11) ...
Starting bluemarine2-service...
Created symlink from /etc/systemd/system/multi-user.target.wants/bluemarine2-service.service to /etc/systemd/system/bluemarine2-service.service.
The service will be automatically started at boot.

Environment

None

Test file(s)

None

Activity

Show:
Fabrizio Giudici
December 13, 2016, 3:14 PM

Part of the problem is due to BMT-81.

Assignee

Fabrizio Giudici

Reporter

Fabrizio Giudici

Labels

None

id

None

Operating system(s)

None

Specs URL

None

Progress in branch

Fix versions

Affects versions

Priority

Major
Configure