license file rendered in binary format

Bug #2059286 reported by Peter Jose De Sousa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Charm
New
Undecided
Unassigned

Bug Description

Hello,

When using the most recent version of the landscape server charm the license file is rendered as binary. This causes landscape server to enter a crash loop:

Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/opt/canonical/landscape/canonical/event/subscriber.py\", line 51, in wrapper
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: return function(*args)
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/opt/canonical/landscape/canonical/landscape/model/main/subscriber.py\", line 196, in check_lds_license_on_startup
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: check_lds_license(startup=True)
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/opt/canonical/landscape/canonical/landscape/model/main/license.py\", line 570, in check_lds_license
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: license_file = create_license_file()
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/opt/canonical/landscape/canonical/landscape/model/main/license.py\", line 601, in create_license_file
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: licensee, licenses, errors = validate_licenses(check_signature)
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/opt/canonical/landscape/canonical/landscape/model/main/license.py\", line 764, in _validate_all_licenses
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: licensee, licenses = _parse_license_file(path, check_signature)
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/opt/canonical/landscape/canonical/landscape/model/main/license.py\", line 693, in _parse_license_file
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: license_contents = open(path).read()
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: File \"/usr/lib/python3.10/codecs.py\", line 322, in decode
Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: (result, consumed) = self._buffer_decode(data, self.errors, final) Mar 27 11:18:32 juju-934e41-lds-1 appserver-2[123840]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x88 in position 2: invalid start byte

[Steps to reproduce]

1. Deploy landscape. Landscape server charm revision 111
2. Set license file as base64
3. SSH to landscape instance and cat the license file: /etc/landscape/license.txt

The output will be binary.

[Workaround]

Downgrade charm to rev 102

Thanks,
Peter

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.