juju-mongodb process hangs around after package removal

Bug #1306315 reported by Adam Stokes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Expired
Medium
Unassigned
juju-mongodb (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce:

Running on Trusty with juju versions:

ii juju-core 1.18.0-0ubuntu1
ii juju-local 1.18.0-0ubuntu1
ii juju-mongodb 2.4.9-0ubuntu3

With environments.yaml as:

default: local

environments:
  local:
    type: local
    container: kvm

juju status output (doesn't matter what charms are deployed or even if a machine is added, showing for completeness):

environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.18.0.1
    dns-name: localhost
    instance-id: localhost
    series: trusty
  "1":
    agent-state: started
    agent-version: 1.18.0.1
    dns-name: 10.0.3.192
    instance-id: poe-local-machine-1
    series: precise
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=8192M
services:
  glance:
    charm: cs:precise/glance-30
    exposed: false
    relations:
      cluster:
      - glance
      identity-service:
      - keystone
      image-service:
      - nova-cloud-controller
      shared-db:
      - mysql
    units:
      glance/0:
        agent-state: pending
        agent-version: 1.18.0.1
        machine: "1"
        public-address: 10.0.3.192
  keystone:
    charm: cs:precise/keystone-31
    exposed: false
    relations:
      cluster:
      - keystone
      identity-service:
      - glance
      - nova-cloud-controller
      - openstack-dashboard
      shared-db:
      - mysql
    units:
      keystone/0:
        agent-state: pending
        agent-version: 1.18.0.1
        machine: "1"
        public-address: 10.0.3.192
  mysql:
    charm: cs:precise/mysql-39
    exposed: false
    relations:
      cluster:
      - mysql
      shared-db:
      - glance
      - keystone
      - nova-cloud-controller
    units:
      mysql/0:
        agent-state: started
        agent-version: 1.18.0.1
        machine: "1"
        public-address: 10.0.3.192
  nova-cloud-controller:
    charm: cs:precise/nova-cloud-controller-32
    exposed: false
    relations:
      amqp:
      - rabbitmq-server
      cluster:
      - nova-cloud-controller
      identity-service:
      - keystone
      image-service:
      - glance
      shared-db:
      - mysql
    units:
      nova-cloud-controller/0:
        agent-state: pending
        agent-version: 1.18.0.1
        machine: "1"
        public-address: 10.0.3.192
  openstack-dashboard:
    charm: cs:precise/openstack-dashboard-15
    exposed: false
    relations:
      cluster:
      - openstack-dashboard
      identity-service:
      - keystone
    units:
      openstack-dashboard/0:
        agent-state: pending
        agent-version: 1.18.0.1
        machine: "1"
        public-address: 10.0.3.192
  rabbitmq-server:
    charm: cs:precise/rabbitmq-server-21
    exposed: false
    relations:
      amqp:
      - nova-cloud-controller
      cluster:
      - rabbitmq-server
    units:
      rabbitmq-server/0:
        agent-state: pending
        agent-version: 1.18.0.1
        machine: "1"
        public-address: 10.0.3.192

Output of juju version of mongodb:

root 27184 1 1 20:53 ? 00:00:02 /usr/lib/juju/bin/mongod --auth --dbpath=/home/poe/.juju/local/db --sslOnNormalPorts --sslPEMKeyFile /home/poe/.juju/local/server.pem --sslPEMKeyPassword xxxxxxx --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles
poe 28089 13413 0 20:57 pts/0 00:00:00 grep --color=auto mongo

Destroy the environment:

juju destroy-environment local

Remove packages:

sudo apt-get remove juju-local juju-mongodb juju-core

Check if the /usr/lib/juju/bin/mongod process is still there (it is)

Attempt to re-bootstrap a new local environment

$ juju bootstrap
ERROR cannot use 37017 as state port, already in use

Kill the process (sometimes it even attempts to respawn). Make sure the process is finally gone and re-bootstrap to a working environment.

tags: added: cloud-installer local-provider
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.19.0
tags: added: mongodb
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.19.0 → 1.19.1
John A Meinel (jameinel)
Changed in juju-core:
milestone: 1.19.1 → none
status: Triaged → Invalid
Revision history for this message
James Page (james-page) wrote :

Execution/termination of the binary is juju's job, not the packaging.

Changed in juju-core:
status: Invalid → New
Changed in juju-mongodb (Ubuntu):
status: New → Invalid
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1306315] Re: juju-mongodb process hangs around after package removal

James, this may be a special case for juju-mongodb, but if you uninstall a
package, doesn't it usually stop the service that was running?
(uninstalling postgres should stop the postgres process, right?)

I guess in the case of juju-mongodb we have the problem that the packaging
itself isn't setting up the upstart script, but it is only set up when you
have bootstrapped an environment. I can't quite say what *should* happen if
you uninstall a package that we are depending on.

Certainly "juju destroy-environment" should be deleting the upstart script,
I'm just trying to understand if "apt-get remove juju-mongodb" should also
be stopping services that were using it. Or whether this bug should just be
WontFix.

On Wed, Apr 30, 2014 at 7:46 PM, Curtis Hovey <email address hidden> wrote:

> ** Changed in: juju-core
> Status: New => Triaged
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1306315
>
> Title:
> juju-mongodb process hangs around after package removal
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1306315/+subscriptions
>

Revision history for this message
Curtis Hovey (sinzui) wrote :

The destruction of the local env is responsible for SIGABRTing mongod, removing, local files (specifically .juu/local/db in the case) and removing the env's upstart scripts. Uninstalling the package will remove what the services and files it installed...it didn't install the local db or the upstart script

The symptoms imply destroy-environment didn't clean up.

tags: added: destroy-environment
removed: mongodb
Curtis Hovey (sinzui)
Changed in juju-core:
importance: High → Medium
Revision history for this message
Adam Stokes (adam-stokes) wrote :

I honestly haven't ran into this for a long time. I think we can close this out.

Changed in juju-core:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju-core because there has been no activity for 60 days.]

Changed in juju-core:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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