maas.config script uses pwgen

Bug #977475 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas (Ubuntu)
Fix Released
Critical
Andres Rodriguez

Bug Description

maas.config does:

if ([ "$1" = "configure" ] && [ -z "$2" ]); then
   maas_db_pass=`pwgen`
   dbc_dbname="maasdb"
   dbc_dbuser="maas"
   dbc_dbpass="$maas_db_pass"
   dbc_remove="true"

That results in
Fetched 60.3 MB in 4s (12.3 MB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
/tmp/maas.config.17533: 1: /tmp/maas.config.17533: pwgen: not found
maas failed to preconfigure, with exit status 127
Selecting previously unselected package libavahi-common-data.
(Reading database ... 26351 files and directories currently installed.)

basically, you can't use pwgen in a .config as its not essential.

looking at the code, i'm not sure how this doesn't end up in a blank password, but thankfully, it does not.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: maas 0.1+bzr415+dfsg-0ubuntu2
ProcVersionSignature: User Name 3.2.0-22.35-virtual 3.2.14
Uname: Linux 3.2.0-22-virtual x86_64
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Mon Apr 9 19:15:44 2012
Ec2AMI: ami-00000095
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
MAASLog: Error: [Errno 13] Permission denied: '/var/log/maas/maas.log'
MAASPservLog:

PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 python-django-maas 0.1+bzr415+dfsg-0ubuntu2
 apparmor 2.7.102-0ubuntu2
SourcePackage: maas
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.maas.maas.local.settings.py: [modified]
modified.conffile..etc.maas.pserv.yaml: [modified]
modified.conffile..etc.maas.txlongpoll.yaml: [modified]
mtime.conffile..etc.maas.maas.local.settings.py: 2012-04-09T19:13:56.709928
mtime.conffile..etc.maas.pserv.yaml: 2012-04-09T19:13:50.465928
mtime.conffile..etc.maas.txlongpoll.yaml: 2012-04-09T19:13:52.397928

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Changed in maas (Ubuntu):
assignee: nobody → Andres Rodriguez (andreserl)
status: New → In Progress
importance: Undecided → Critical
Changed in maas (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas - 0.1+bzr462+dfsg-0ubuntu1

---------------
maas (0.1+bzr462+dfsg-0ubuntu1) precise; urgency=low

  * New upstream release (LP: #980240)

  [ Scott Moser ]
  * add dependency on distro-info (LP: #949442)
  * debian/control: add dependency on tgt for ephemeral iscsi environment

  [ Andres Rodriguez ]
  * Make package lintian clean:
    - maas{-dhcp}.lintian-overrides: Add to make lintian clean.
    - debian/control: Add missing dependencies; correct section and desc.
    - debian/maas.postinst: Do not use absolute path for rabbitmqctl.
    - debian/patches: Add headers to all patches.
  * debian/maas-dhcp.postrm: Added to disable dnsmasq in cobbler on removal.
  * debian/maas.config: Do not set a password with pwgen as it is not an
    essential package; allow dbconfig-common to create a password instead by
    creating an empty question. (LP: #977475)
  * Run MAAS, pserv, txlongpoll as non-root user. (LP: #975436)
    - debian/maas.postinst: Create user/group; set correct permissions for
      directories.
    - debian/maas.postrm: Remove user/group; restart apache2.
    - debian/maas.maas-{pserv,txlongpoll}.upstart: Update to run as non-root
      'maas' user.
  * debian/patches/01-fix-database-settings.patch: Remove adding of PSERV_URL.
  * debian/maas.postinst:
    - Handle config file upgrade from versions lower than 0.1+bzr445+dfsg-0ubuntu1,
      by creating new passwords and updating accordingly
    - use local variables in functions.
    - Handle maas tgt configuration for upgrades from 0.1+bzr459+dfsg-0ubuntu1.
  * debian/extras/99-maas: Add squid-deb-proxy file to enable PPAs. (LP: #979383)
  * debian/maas.install: Install missing commissioning-user-data script.

  [ Dave Walker (Daviey) ]
  * debian/patches/02-pserv-config.patch: Refreshed to apply to updated config.

  [ Gavin Panella ]
  * debian/maas.postinst: Update pserv.yaml and maas_local_settings.py to use
    password.
 -- Andres Rodriguez <email address hidden> Thu, 12 Apr 2012 16:46:22 -0400

Changed in maas (Ubuntu):
status: Fix Committed → Fix Released
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.