Meanwhile as it mandate a list of keys even if only passing one .. I
would suggest to turn this into a documentation issue .. (which would
be find)
On Fri, Nov 13, 2015 at 8:26 AM, Stuart Bishop
<email address hidden> wrote:
> ** Changed in: charm-helpers
> Status: New => Invalid
>
> ** Changed in: charm-helpers
> Status: Invalid => New
>
> ** Changed in: charm-helpers
> Status: New => Incomplete
>
> ** Changed in: charm-helpers
> Status: Incomplete => Opinion
>
> ** Changed in: charm-helpers
> Status: Opinion => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1515699
>
> Title:
> add_source fails if passing a full block key
>
> Status in Charm Helpers:
> Invalid
>
> Bug description:
> must use local copy of the ppa (opnecontrail or contrail) and won't
> have access to the keyserver etc..
>
> I nailed the issue as follow :
>
> in add_source(source, key=None): in juju helpers python:
> I try to pass a block with the gpg key starting with -----BEGIN PGP
> PUBLIC KEY BLOCK----- and it fails on safe_loader ..
>
> but if I do manually :
> config-get install-keys | apt-key add -
> OK
> it works ..
>
> I might have badly formed it but could not figure out .. seems related
> to safe_loader
>
>
> Backtrace :
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Traceback (most recent call last):
> File "./hooks/install", line 406, in <module>
> main()
> File "./hooks/install", line 336, in main
> hooks.execute(sys.argv)
> File "/var/lib/juju/agents/unit-contrail-configuration-0/charm/hooks/charmhelpers/core/hookenv.py",
> line 672, in execute
> self._hooks[hook_name]()
> File "./hooks/install", line 314, in install
> configure_sources(True, "install-sources", "install-keys")
> File "/var/lib/juju/agents/unit-contrail-configuration-0/charm/hooks/charmhelpers/fetch/__init__.py",
> line 339, in configure_sources
> keys = safe_load((config(keys_var) or '').strip()) or None
> File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 93,
> in safe_load
> return load(stream, SafeLoader)
> File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
> return loader.get_single_data()
> File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line
> 37, in get_single_data
> node = self.get_single_node()
> File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36,
> in get_single_node
> document = self.compose_document()
> File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 58,
> in compose_document
> self.get_event()
> File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 118, in get_event
> self.current_event = self.state()
> File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 193, in
> parse_document_end
> token = self.peek_token()
> File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 128,
> in peek_token
> self.fetch_more_tokens()
> File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 220,
> in fetch_more_tokens
> return self.fetch_value()
> File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 576,
> in fetch_value
> self.get_mark())
> yaml.scanner.ScannerError: mapping values are not allowed here
> in "<unicode string>", line 2, column 9:
> Version\: GnuPG v1
> ^
> Looks like safe_loader want to interpret it
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charm-helpers/+bug/1515699/+subscriptions
--
Best Regards,
Nicolas Thomas http://insights.ubuntu.com/?p=889
EMEA Solution Architect Canonical
GPG FPR: D592 4185 F099 9031 6590 6292 492F C740 F03A 7EB9
I agree and can confirm this Stuart.
Meanwhile as it mandate a list of keys even if only passing one .. I
would suggest to turn this into a documentation issue .. (which would
be find)
On Fri, Nov 13, 2015 at 8:26 AM, Stuart Bishop /bugs.launchpad .net/bugs/ 1515699 sys.argv) juju/agents/ unit-contrail- configuration- 0/charm/ hooks/charmhelp ers/core/ hookenv. py", hook_name] () sources( True, "install-sources", "install-keys") juju/agents/ unit-contrail- configuration- 0/charm/ hooks/charmhelp ers/fetch/ __init_ _.py", (config( keys_var) or '').strip()) or None python2. 7/dist- packages/ yaml/__ init__. py", line 93, python2. 7/dist- packages/ yaml/__ init__. py", line 71, in load get_single_ data() python2. 7/dist- packages/ yaml/constructo r.py", line single_ node() python2. 7/dist- packages/ yaml/composer. py", line 36, document( ) python2. 7/dist- packages/ yaml/composer. py", line 58, python2. 7/dist- packages/ yaml/parser. py", line 118, in get_event python2. 7/dist- packages/ yaml/parser. py", line 193, in python2. 7/dist- packages/ yaml/scanner. py", line 128, more_tokens( ) python2. 7/dist- packages/ yaml/scanner. py", line 220, python2. 7/dist- packages/ yaml/scanner. py", line 576, ScannerError: mapping values are not allowed here /bugs.launchpad .net/charm- helpers/ +bug/1515699/ +subscriptions
<email address hidden> wrote:
> ** Changed in: charm-helpers
> Status: New => Invalid
>
> ** Changed in: charm-helpers
> Status: Invalid => New
>
> ** Changed in: charm-helpers
> Status: New => Incomplete
>
> ** Changed in: charm-helpers
> Status: Incomplete => Opinion
>
> ** Changed in: charm-helpers
> Status: Opinion => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> add_source fails if passing a full block key
>
> Status in Charm Helpers:
> Invalid
>
> Bug description:
> must use local copy of the ppa (opnecontrail or contrail) and won't
> have access to the keyserver etc..
>
> I nailed the issue as follow :
>
> in add_source(source, key=None): in juju helpers python:
> I try to pass a block with the gpg key starting with -----BEGIN PGP
> PUBLIC KEY BLOCK----- and it fails on safe_loader ..
>
> but if I do manually :
> config-get install-keys | apt-key add -
> OK
> it works ..
>
> I might have badly formed it but could not figure out .. seems related
> to safe_loader
>
>
> Backtrace :
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Traceback (most recent call last):
> File "./hooks/install", line 406, in <module>
> main()
> File "./hooks/install", line 336, in main
> hooks.execute(
> File "/var/lib/
> line 672, in execute
> self._hooks[
> File "./hooks/install", line 314, in install
> configure_
> File "/var/lib/
> line 339, in configure_sources
> keys = safe_load(
> File "/usr/lib/
> in safe_load
> return load(stream, SafeLoader)
> File "/usr/lib/
> return loader.
> File "/usr/lib/
> 37, in get_single_data
> node = self.get_
> File "/usr/lib/
> in get_single_node
> document = self.compose_
> File "/usr/lib/
> in compose_document
> self.get_event()
> File "/usr/lib/
> self.current_event = self.state()
> File "/usr/lib/
> parse_document_end
> token = self.peek_token()
> File "/usr/lib/
> in peek_token
> self.fetch_
> File "/usr/lib/
> in fetch_more_tokens
> return self.fetch_value()
> File "/usr/lib/
> in fetch_value
> self.get_mark())
> yaml.scanner.
> in "<unicode string>", line 2, column 9:
> Version\: GnuPG v1
> ^
> Looks like safe_loader want to interpret it
>
> To manage notifications about this bug go to:
> https:/
-- insights. ubuntu. com/?p= 889
Best Regards,
Nicolas Thomas
http://
EMEA Solution Architect Canonical
GPG FPR: D592 4185 F099 9031 6590 6292 492F C740 F03A 7EB9