Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-10 Thread Paul Gevers
Hi Andres,

On 10-03-16 02:47, Andres Rodriguez wrote:
> So this confirms that because of the postrm bug, we would see the install
> issues.

Good that we nailed it down.

> however, I wonder if dbconfig-common should do
> something to not to write a new config ?

As dbconfig-common leaves this to ucf, I think than it should be done
there. Or do you have something else in mind?

Paul

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-09 Thread Andres Rodriguez
Hi Paul,

So this is what I did:

1. Modified the postrm to not check for
/etc/dbconfig-common/maas-region-controller.conf
2. purged maas
3. re-installed maas and the result was:
dbconfig-common: writing config to
/etc/dbconfig-common/maas-region-controller.conf
Creating config file /etc/dbconfig-common/maas-region-controller.conf with
new version


The, I did:
1. Install maas with buggy postrm.
2. purged  maas. / dbconfig*, /etc/dbconfig-common was left with
maas-region-controller.postinst, so I removed it.
3. Installed maas again, and the result:
dbconfig-common: writing config to
/etc/dbconfig-common/maas-region-controller.conf
stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No
such file or directory
4. purged maas/dbconfig, but manually fixed maas' postrm.

Finally I did:
1. Installed maas, result:
dbconfig-common: writing config to
/etc/dbconfig-common/maas-region-controller.conf
Creating config file /etc/dbconfig-common/maas-region-controller.conf with
new version
2. purged maas/dbconfig* with fixed postrm. /etc/dbconfig-common got
removed.
4. Installed maas again, and things went well.

So this confirms that because of the postrm bug, we would see the install
issues. So fixing this is MAAS definitely fixes the error I was having. I'm
gonna mark the bug invalid, however, I wonder if dbconfig-common should do
something to not to write a new config ?



On Tue, Mar 8, 2016 at 2:32 PM, Paul Gevers <1553...@bugs.launchpad.net>
wrote:

> Hi Andres,
>
> On 08-03-16 04:41, Andres Rodriguez wrote:
> > Sorry for the delay and thanks for looking into it. Good catch on the
> > postrm. At least I know that's my fault. That being said, I wonder if
> > unregistering the file actually explains why it doesn't get re-created.
>
> Hmm, I was a bit to certain in my phrasing. I should have said: it COULD
> be caused by the admin and the way maas handles purging. By no means did
> I mean that it is certain here.
>
> > The
> > funny thing here is that this is the first time it actually does
> something
> > similar (not creating the file), and the packaging hasn;'t really change
> in
> > that area.
>
> Neither has dbconfig-common.
>
> > I'm gonna try to reproduce what you suggest with touching the file and
> see
> > whether things get resolved with the fix to postrm..
>
> Good.
>
> By the way, I tried removing the configuration file while working with
> one of my example packages (included in the source of dbconfig-common)
> and the behavior of ucf is as expected.
>
> Unfortunately, on my Debian system I can't easily check installing maas
> with apt-get, as that is not available in Debian.
>
> Paul
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1553757
>
> Title:
>   dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
>   controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
>   controller.conf': No such file or directory
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions
>


-- 
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-08 Thread Paul Gevers
Hi Andres,

On 08-03-16 04:41, Andres Rodriguez wrote:
> Sorry for the delay and thanks for looking into it. Good catch on the
> postrm. At least I know that's my fault. That being said, I wonder if
> unregistering the file actually explains why it doesn't get re-created.

Hmm, I was a bit to certain in my phrasing. I should have said: it COULD
be caused by the admin and the way maas handles purging. By no means did
I mean that it is certain here.

> The
> funny thing here is that this is the first time it actually does something
> similar (not creating the file), and the packaging hasn;'t really change in
> that area.

Neither has dbconfig-common.

> I'm gonna try to reproduce what you suggest with touching the file and see
> whether things get resolved with the fix to postrm..

Good.

By the way, I tried removing the configuration file while working with
one of my example packages (included in the source of dbconfig-common)
and the behavior of ucf is as expected.

Unfortunately, on my Debian system I can't easily check installing maas
with apt-get, as that is not available in Debian.

Paul

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-08 Thread Paul Gevers
Hi Andres,


On 08-03-16 04:38, Andres Rodriguez wrote:
> So the reason we did this is because we wanted MAAS to be installed and we
> didn't want any question to be asked, so we decided to do the preseeding.

I recommend that you try to use dbc_prio_high=medium instead of your
current code. By default only questions with prio=high are asked, so I
think that the default behavior will be that dbconfig-common is run as
you desire, without removing the possibility by the admin to configure
otherwise. Also the default "remote-host" is localhost. You would also
need way less code to "work around" dbconfig-common "limitations".

> The registration piece is something that I found in another package, but
> allowed MAAS to register the preseed options, otherwise this would have
> failed!

My point is that is looks like you are registering the wrong question
for your template, aren't you? Or am I mistaken here/

Paul

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-07 Thread Andres Rodriguez
Hi Paul

Sorry for the delay and thanks for looking into it. Good catch on the
postrm. At least I know that's my fault. That being said, I wonder if
unregistering the file actually explains why it doesn't get re-created. The
funny thing here is that this is the first time it actually does something
similar (not creating the file), and the packaging hasn;'t really change in
that area.

I'm gonna try to reproduce what you suggest with touching the file and see
whether things get resolved with the fix to postrm..

Thanks!

On Mon, Mar 7, 2016 at 4:02 PM, Paul Gevers <1553...@bugs.launchpad.net>
wrote:

> Andres,
>
> This (in maas-region-controller.postrm) prevents dbconfig-common from
> unregistring the file with ucf (so the fact that you see the ucf prompt
> after purging and installing is at least caused by maas itself):
> if [ -f /etc/dbconfig-common/maas.conf ]; then
> if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
> . /usr/share/dbconfig-common/dpkg/postrm.pgsql
> dbc_go maas-region-controller $@
> fi
> fi
>
> Paul
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1553757
>
> Title:
>   dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
>   controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
>   controller.conf': No such file or directory
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions
>


-- 
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-07 Thread Andres Rodriguez
So the reason we did this is because we wanted MAAS to be installed and we
didn't want any question to be asked, so we decided to do the preseeding.
The registration piece is something that I found in another package, but
allowed MAAS to register the preseed options, otherwise this would have
failed!

On Mon, Mar 7, 2016 at 3:59 PM, Paul Gevers <1553...@bugs.launchpad.net>
wrote:

> Hi Andres,
>
> Maybe unrelated and I may not understand your intentions, but I see the
> following in your maas-region-controller.config:
> set_question() {
> if ! db_fget "$1" seen; then
> db_register dbconfig-common/dbconfig-install "$1"
> db_subst "$1" ID "$1"
> db_fget "$1" seen
> fi
>
>
> Which gets called by:
> set_question maas-region-controller/dbconfig-install true
> set_question maas-region-controller/pgsql/app-pass ""
> set_question maas-region-controller/remote/host "localhost"
>
> But isn't the question from the second set, the $1 in the first
> function? So shouldn't that "db_register" line also register the other
> questions and use the value provided as argument?
>
> Paul
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1553757
>
> Title:
>   dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
>   controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
>   controller.conf': No such file or directory
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions
>


-- 
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-07 Thread Paul Gevers
Andres,

This (in maas-region-controller.postrm) prevents dbconfig-common from
unregistring the file with ucf (so the fact that you see the ucf prompt
after purging and installing is at least caused by maas itself):
if [ -f /etc/dbconfig-common/maas.conf ]; then
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm.pgsql
dbc_go maas-region-controller $@
fi
fi

Paul

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 1553757] Re: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-controller.conf': No such file or director

2016-03-07 Thread Paul Gevers
Hi Andres,

Maybe unrelated and I may not understand your intentions, but I see the
following in your maas-region-controller.config:
set_question() {
if ! db_fget "$1" seen; then
db_register dbconfig-common/dbconfig-install "$1"
db_subst "$1" ID "$1"
db_fget "$1" seen
fi


Which gets called by:
set_question maas-region-controller/dbconfig-install true
set_question maas-region-controller/pgsql/app-pass ""
set_question maas-region-controller/remote/host "localhost"

But isn't the question from the second set, the $1 in the first
function? So shouldn't that "db_register" line also register the other
questions and use the value provided as argument?

Paul

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dbconfig-common in Ubuntu.
https://bugs.launchpad.net/bugs/1553757

Title:
  dbconfig-common: writing config to /etc/dbconfig-common/maas-region-
  controller.conf stat: cannot stat '/etc/dbconfig-common/maas-region-
  controller.conf': No such file or directory

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1553757/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs