Comment 3 for bug 2033066

Revision history for this message
Tom Haddon (mthaddon) wrote :

I believe this is the fix, but I'm still trying to reproduce the bug:

```
$ bzr di
=== modified file 'hooks/hooks.py'
--- old/hooks/hooks.py 2023-08-09 07:20:52 +0000
+++ new/hooks/hooks.py 2023-08-27 13:13:08 +0000
@@ -833,7 +833,7 @@
             full_path = os.path.join(
                 path, "%s.http" % errorfile["http_status"])
             with open(full_path, 'w') as f:
- f.write(base64.b64decode(errorfile["content"]))
+ f.write(base64.b64decode(errorfile["content"]).decode('utf-8'))

         # Write to disk the content of the given SSL certificates
         crts = service_config.get('crts', [])

```

I've tried recreating the issue with the following bundle, but have so far been unable to do so:
```
# Create certs as follows:
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
#
applications:
  haproxy:
    charm: haproxy
    num_units: 1
    series: jammy
    options:
      default_timeouts: queue 60000, connect 5000, client 120000, server 120000
      global_default_bind_options: no-tlsv10
      services: ''
      ssl_cert: include-base64://cert.pem
      ssl_key: include-base64://key.pem
  pollen:
    charm: pollen
    channel: latest/edge
    series: jammy
    num_units: 1
relations:
  - - haproxy
    - pollen
```
Can you confirm if the options mentioned in the bug report are the full list of options to reproduce the bug? Or can you provide a reproducer?