Logger prefixes for api/apiserver are changing

2014-09-02 Thread Dimiter Naydenov
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

As you may already know, this pull request just landed today, moving
state/api/ -> api/ and state/apiserver/ -> apiserver/ :
https://github.com/juju/juju/pull/655

It didn't fix the logger prefixes in some places, which I'm fixing
with this follow-up: https://github.com/juju/juju/pull/659

So be aware anything in the moved to top-level packages "api" and
"apiserver" will use "juju.api.*" and "juju.apiserver.*" logger
prefixes from now on (existing code will be converted as soon as #659
lands, but for new code please follow the same pattern).

Cheers!
- -- 
Dimiter Naydenov 
juju-core team
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUBZUhAAoJENzxV2TbLzHwewkH/AhtPOv1h3w+9LkyQdmH7Pbl
28cucj422TOXIek65+tB4fGmeCglQTPJkaLcsImWxKhYU7oAP9iT52lKjHiV377t
l7sSVprKWp1AfF307lT6xI8derNnoSJtEHTwbXZKc4LaQt60Zv/++yuc4xLu/zYJ
z2rkypveSTfGrL7AqdoSsgmj1HbbO3uw9dlz17Mw96FuHsPZbOm28P+g3Y8FYjLR
4EBkZ+qHoUGl0dUV4hQyezFiY5H3SXPhqEIpm2ImPpj5MfNHPd1w7PHlPzXVcrkC
WxWSzpdPsNhOi3AWGT9lwLaLkMA4emt/24exHHVifKFnzOy/Ob4Dr/QnYaB8zfM=
=Mkd/
-END PGP SIGNATURE-

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread John Meinel
I just wanted to make sure that this makes it into the release notes, as it
is a semi-user-visible change.

John
=:->


On Tue, Sep 2, 2014 at 2:00 PM, Dimiter Naydenov <
dimiter.nayde...@canonical.com> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> As you may already know, this pull request just landed today, moving
> state/api/ -> api/ and state/apiserver/ -> apiserver/ :
> https://github.com/juju/juju/pull/655
>
> It didn't fix the logger prefixes in some places, which I'm fixing
> with this follow-up: https://github.com/juju/juju/pull/659
>
> So be aware anything in the moved to top-level packages "api" and
> "apiserver" will use "juju.api.*" and "juju.apiserver.*" logger
> prefixes from now on (existing code will be converted as soon as #659
> lands, but for new code please follow the same pattern).
>
> Cheers!
> - --
> Dimiter Naydenov 
> juju-core team
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJUBZUhAAoJENzxV2TbLzHwewkH/AhtPOv1h3w+9LkyQdmH7Pbl
> 28cucj422TOXIek65+tB4fGmeCglQTPJkaLcsImWxKhYU7oAP9iT52lKjHiV377t
> l7sSVprKWp1AfF307lT6xI8derNnoSJtEHTwbXZKc4LaQt60Zv/++yuc4xLu/zYJ
> z2rkypveSTfGrL7AqdoSsgmj1HbbO3uw9dlz17Mw96FuHsPZbOm28P+g3Y8FYjLR
> 4EBkZ+qHoUGl0dUV4hQyezFiY5H3SXPhqEIpm2ImPpj5MfNHPd1w7PHlPzXVcrkC
> WxWSzpdPsNhOi3AWGT9lwLaLkMA4emt/24exHHVifKFnzOy/Ob4Dr/QnYaB8zfM=
> =Mkd/
> -END PGP SIGNATURE-
>
> --
> Juju-dev mailing list
> Juju-dev@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread David Cheney
Wow. I'm sorry I broke that, it didn't even occur to me.

I wonder if there is a better way to handle this default case of "the
name of the logger follows the package path"), ie

var logger = loggo.Logger("") // or something, it could be a new
method, logger.Default(), or something.

which will inspect the call tree and determine its logger name automagically.

On Tue, Sep 2, 2014 at 8:00 PM, Dimiter Naydenov
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> As you may already know, this pull request just landed today, moving
> state/api/ -> api/ and state/apiserver/ -> apiserver/ :
> https://github.com/juju/juju/pull/655
>
> It didn't fix the logger prefixes in some places, which I'm fixing
> with this follow-up: https://github.com/juju/juju/pull/659
>
> So be aware anything in the moved to top-level packages "api" and
> "apiserver" will use "juju.api.*" and "juju.apiserver.*" logger
> prefixes from now on (existing code will be converted as soon as #659
> lands, but for new code please follow the same pattern).
>
> Cheers!
> - --
> Dimiter Naydenov 
> juju-core team
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJUBZUhAAoJENzxV2TbLzHwewkH/AhtPOv1h3w+9LkyQdmH7Pbl
> 28cucj422TOXIek65+tB4fGmeCglQTPJkaLcsImWxKhYU7oAP9iT52lKjHiV377t
> l7sSVprKWp1AfF307lT6xI8derNnoSJtEHTwbXZKc4LaQt60Zv/++yuc4xLu/zYJ
> z2rkypveSTfGrL7AqdoSsgmj1HbbO3uw9dlz17Mw96FuHsPZbOm28P+g3Y8FYjLR
> 4EBkZ+qHoUGl0dUV4hQyezFiY5H3SXPhqEIpm2ImPpj5MfNHPd1w7PHlPzXVcrkC
> WxWSzpdPsNhOi3AWGT9lwLaLkMA4emt/24exHHVifKFnzOy/Ob4Dr/QnYaB8zfM=
> =Mkd/
> -END PGP SIGNATURE-
>
> --
> Juju-dev mailing list
> Juju-dev@lists.ubuntu.com
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/juju-dev

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Eric Snow
On Tue, Sep 2, 2014 at 5:07 AM, David Cheney  wrote:
> I wonder if there is a better way to handle this default case of "the
> name of the logger follows the package path"), ie
>
> var logger = loggo.Logger("") // or something, it could be a new
> method, logger.Default(), or something.
>
> which will inspect the call tree and determine its logger name automagically.

+1

-eric

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: State should not depend on the API server

2014-09-02 Thread Eric Snow
On Mon, Sep 1, 2014 at 12:03 AM, John Meinel  wrote:
> FWIW I'd favor 3 layers, though it does mean you have to do copying between
> structs that would likely otherwise be almost identical. A State layer for
> saving in the DB, an API layer for communication, and a Model layer for use
> in the Agents/Clients.

This is pretty much what I've done for the new backups in response to
conversations with Menno and William.  It's worked out fine.  The 3
types are similar, but in each case have been slightly different.  So
the choice of having them different has proved helpful.

-eric

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: State should not depend on the API server

2014-09-02 Thread Eric Snow
On Mon, Sep 1, 2014 at 12:05 AM, David Cheney
 wrote:
> The goal I have been tasked with is breaking the interdependency
> between the state package and the _client_ api types in
> state/api/params.

Thank you!

-eric

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: State should not depend on the API server

2014-09-02 Thread Eric Snow
On Mon, Sep 1, 2014 at 1:02 AM, Frank Mueller
 wrote:
> I absolutely like this approach, John and I discussed more than once about
> it. And as a consequence, in a later cleanup, the API packages have to leave
> the state namespace.

It would also be nice to separate the "public" client from the client
code used just by agents.

-eric

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


auth fails bug reports

2014-09-02 Thread Matthew Williams
Hi Folks,

Casey and I spent some time today looking at the "auth fails" during
TearDownTest symptom/ bug:

https://bugs.launchpad.net/juju-core/+bug/1348477.

The failure seems to happen across various tests. The same problem was
reported across a number of the errors listed in our juju test failures doc.

Additional logging was added to this part of the code this morning (thanks
Dimiter!) so now we have a better chance of working out exactly where the
error comes from. If anyone running near HEAD encounters this problem Casey
and I would be interesting in seeing logs from the error. In particular any
lines that look like this:

ERROR juju.state failed to stop state watcher: 

ERROR juju.state failed to stop presence watcher: 

ERROR juju.state failed to stop all manager: 

Thanks

Matty
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread David Cheney
I'll take thumper's temperature for this feature at the standup and
see what he thinks.

On Wed, Sep 3, 2014 at 12:30 AM, Eric Snow  wrote:
> On Tue, Sep 2, 2014 at 5:07 AM, David Cheney  
> wrote:
>> I wonder if there is a better way to handle this default case of "the
>> name of the logger follows the package path"), ie
>>
>> var logger = loggo.Logger("") // or something, it could be a new
>> method, logger.Default(), or something.
>>
>> which will inspect the call tree and determine its logger name automagically.
>
> +1
>
> -eric

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: gccgo internal compiler errors

2014-09-02 Thread Curtis Hovey-Canonical
I have been away.

On Fri, Aug 29, 2014 at 8:36 AM, Ian Booth  wrote:
> Yep, and we already want to do this for Windows compiles anyway. When I say 
> want
> to, I mean we've already agreed that it should be done. So adding an extra
> compile step for gccgo should be done also.
>
> On 29/08/14 21:36, John Meinel wrote:
>> I think the bot could be taught to at least compile all the tests under
>> gccgo (with go test -compiler=gcc -c). That would at least let us detect
>> compile failures.

I think we want git-merge-juju to exercise multiple compilation
targets. We want to replace the lts-armd64 smoke-test with a more
rigorous set of runs with compilers and OSes:
precise amd64 golang
trusty i386 goland
trusty amd64 golang
trusty ppc64el gccgo
win amd64 golang
by setting
GOOS
GOARCH
-compiler

If you want to do more (run tests) then just move the CI unit-test
jobs into git-merge-juju responsibility and accept longer merge times.

Also, we don't cross-compile. Everything that is released is native
compiled, so CI tests that scenario. I am happy to add
cross-compilation to flag bad changes early, but we will continue to
test packages based on what will be released.

-- 
Curtis Hovey
Canonical Cloud Development and Operations
http://launchpad.net/~sinzui

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


review PR 512

2014-09-02 Thread Nate Finch
Someone who is allowed to give LGTMs please review PR 512
https://github.com/juju/juju/pull/512
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Using sshuttle caused a problem with my juju local

2014-09-02 Thread Matt Bruzek
Hello Juju developers,

I thought I found a bug 
with juju but it turned out to be related to my use of sshuttle.  This was
a complex problem to debug and wanted to email everyone to avoid debug time
in the future.

My day job involves testing charms in the lab on a PPC64 system that only
supports juju local.  I use a shuttle command so to view the juju-gui on
the lab system.  The shuttle command forwards all 10.0.3.* traffic from my
laptop to the lab system.  The forwarding caused a problem with juju local
because the tools are download from 10.0.3.1 so it only saw ppc64 tools.
Those tools did not work on my x86_64 local environment!

I forgot that the sshuttle process was running and that is not something
that came up while debugging until Dave asked me to do a netstat on my
system.

Many thanks to the people who were helping me debug this problem,
davecheney, sinzui, and wallyworld!

   - Matt Bruzek 
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Tim Penhey
On 02/09/14 23:07, David Cheney wrote:
> Wow. I'm sorry I broke that, it didn't even occur to me.
> 
> I wonder if there is a better way to handle this default case of "the
> name of the logger follows the package path"), ie
> 
> var logger = loggo.Logger("") // or something, it could be a new
> method, logger.Default(), or something.
> 
> which will inspect the call tree and determine its logger name automagically.

I'm fine with this in theory, but the implementation is a little different.

The behaviour that we have right now is something akin to stripping off
the DVCS path, then replacing slashes for dots to get to the package.

So files that were in
  github.com/juju/juju/state/apiserver/...
used
  "juju.state.apiserver"

There were two ideas proposed:

loggo.LoggerForPackage("juju")

which would walk up the path until it found a path element juju, and
construct the string that way. The other was do use a defined prefix:

loggo.LoggerForPackage("github.com/juju")

which would take what was after those path elements to generate the string.


I'm happy with either being implemented, but would like feedback on the
ideas.

Tim

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread John Meinel
>
> ...
> There were two ideas proposed:
>
> loggo.LoggerForPackage("juju")
>
> which would walk up the path until it found a path element juju, and
> construct the string that way. The other was do use a defined prefix:
>

The only problem here is that we have:
  github.com/juju/juju/juju
and
  github.com/juju/juju/cmd/juju

Which would confuse this algorithm. Though I like its brevity.

John
=:->


>
> loggo.LoggerForPackage("github.com/juju")
>
> which would take what was after those path elements to generate the string.
>
>
> I'm happy with either being implemented, but would like feedback on the
> ideas.
>
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Menno Smits
On 3 September 2014 15:00, John Meinel  wrote:

> ...
>>
>> There were two ideas proposed:
>>
>> loggo.LoggerForPackage("juju")
>>
>> which would walk up the path until it found a path element juju, and
>> construct the string that way. The other was do use a defined prefix:
>>
>
> The only problem here is that we have:
>   github.com/juju/juju/juju
> and
>   github.com/juju/juju/cmd/juju
>
> Which would confuse this algorithm. Though I like its brevity.
>

Ha! I was just about to hit send on an email saying exactly the same thing
:)

Also, when we talk about package paths we really mean the source tree path
right? Every in cmd/juju is in the "main" package but uses a logger named
"juju.cmd.juju". We can really use the real package name to set the logger
name.

- Menno
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Menno Smits
On 3 September 2014 15:07, Menno Smits  wrote:

>
>
> Also, when we talk about package paths we really mean the source tree path
> right? Every in cmd/juju is in the "main" package but uses a logger named
> "juju.cmd.juju". We can really use the real package name to set the logger
> name.
>

Urgh. s/can/can't/
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev