truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.14k stars 617 forks source link

Move to new unifi image results in issue during deploy (either upgrade or new) #15280

Closed kofeyh closed 10 months ago

kofeyh commented 10 months ago

App Name

unifi

Operating System

TrueNAS SCALE 23.10.0'or 23.10.0.1

App Version

7.5.176

Application Events

2023-11-23 14:25:31
Order completed successfully
2023-11-23 14:25:31
Certificate fetched from issuer successfully
2023-11-23 14:25:31
The certificate has been successfully issued
2023-11-23 14:25:29
Domain "unifi2.landsraad.io" verified with "DNS-01" validation
2023-11-23 14:24:25
Presented challenge using DNS-01 challenge mechanism
2023-11-23 14:24:03
Back-off restarting failed container unifi-new in pod unifi-new-7bb95bbc77-w4jdt_ix-unifi-new(cab7e6ca-87d7-4fd0-a1a8-913bb28fb3e4)
2023-11-23 14:23:54
Started container unifi-new
2023-11-23 14:23:54
Created container unifi-new
2023-11-23 14:23:53
Add eth0 [172.16.0.138/16] from ix-net
2023-11-23 14:23:53
Container image "ghcr.io/goofball222/unifi:v7.5.187@sha256:742313ec48b1ab5008d74041114a0aec4b4c18cdff26f2967ed6e98d3b97cb51" already present on machine
2023-11-23 14:23:52
Successfully assigned ix-unifi-new/unifi-new-7bb95bbc77-w4jdt to ix-truenas
2023-11-23 14:23:51
Created Challenge resource "unifi-new-tls-0-1-2343271291-3979594223" for domain "unifi2.landsraad.io"
2023-11-23 14:23:51
Challenge scheduled for processing
2023-11-23 14:23:49
Successfully provisioned volume pvc-0a36865e-120b-495d-a8aa-d8260663283e
2023-11-23 14:23:49
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
2023-11-23 14:23:48
Assigned IP ["10.10.3.104"]
2023-11-23 14:23:48
External provisioner is provisioning volume for claim "ix-unifi-new/unifi-new-config"
2023-11-23 14:23:48
Assigned IP ["10.10.3.104"]
2023-11-23 14:23:48
Assigned IP ["10.10.3.104"]
2023-11-23 14:23:48
waiting for a volume to be created, either by external provisioner "zfs.csi.openebs.io" or manually created by system administrator
2023-11-23 14:23:48
Assigned IP ["10.10.3.104"]
2023-11-23 14:23:48
Assigned IP ["10.10.3.104"]
2023-11-23 14:23:48
Scaled up replica set unifi-new-7bb95bbc77 to 1
2023-11-23 14:23:48
Created pod: unifi-new-7bb95bbc77-w4jdt
2023-11-23 14:23:48
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
2023-11-23 14:23:48
Successfully created Certificate "unifi-new-tls-0"
2023-11-23 14:23:48
Issuing certificate as Secret does not exist
2023-11-23 14:23:48
Stored new private key in temporary Secret resource "unifi-new-tls-0-ccnhj"
2023-11-23 14:23:48
Created new CertificateRequest resource "unifi-new-tls-0-1"
2023-11-23 14:23:48
Not signing CertificateRequest until it is Approved
2023-11-23 14:23:48
Not signing CertificateRequest until it is Approved
2023-11-23 14:23:48
Not signing CertificateRequest until it is Approved
2023-11-23 14:23:48
Not signing CertificateRequest until it is Approved
2023-11-23 14:23:48
Not signing CertificateRequest until it is Approved
2023-11-23 14:23:48
Certificate request has been approved by cert-manager.io
2023-11-23 14:23:48
Created Order resource ix-unifi-new/unifi-new-tls-0-1-2343271291
2023-11-23 14:23:48
Waiting on certificate issuance from order ix-unifi-new/unifi-new-tls-0-1-2343271291: ""

Application Logs

023-11-23 14:26:45.768319+10:30[2023-11-23 14:26:45,768] <docker-entrypoint> INFO - Entrypoint script version 1.1.0
2023-11-23 14:26:45.769208+10:30[2023-11-23 14:26:45,769] <docker-entrypoint> INFO - Entrypoint functions version 1.0.8
2023-11-23 14:26:45.771037+10:30[2023-11-23 14:26:45,770] <docker-entrypoint> WARN - Container/entrypoint not started as UID 0 (root)
2023-11-23 14:26:45.771819+10:30[2023-11-23 14:26:45,771] <docker-entrypoint> WARN - Unable to change permissions or set custom GID/UID if configured
2023-11-23 14:26:45.773951+10:30[2023-11-23 14:26:45,773] <docker-entrypoint> WARN - Process will be spawned with GID=999, UID=999
2023-11-23 14:26:45.774722+10:30[2023-11-23 14:26:45,774] <docker-entrypoint> WARN - Depending on permissions requested command may not work
2023-11-23 14:26:45.775583+10:30[2023-11-23 14:26:45,775] <docker-entrypoint> WARN - ======================================================================
2023-11-23 14:26:45.776356+10:30[2023-11-23 14:26:45,776] <docker-entrypoint> WARN - One or more of: 'DB_MONGO_LOCAL', 'DB_MONGO_URI', 'STATDB_MONGO_URI', or 'UNIFI_DB_NAME' is unset.
2023-11-23 14:26:45.777163+10:30[2023-11-23 14:26:45,777] <docker-entrypoint> WARN - In the future you should consider running UniFi on Docker with an external Mongo DB instance defined.
2023-11-23 14:26:45.777969+10:30[2023-11-23 14:26:45,777] <docker-entrypoint> WARN - *** Please check the README.md and examples at https://github.com/goofball222/unifi ***
2023-11-23 14:26:45.778756+10:30[2023-11-23 14:26:45,778] <docker-entrypoint> WARN - ======================================================================
2023-11-23 14:26:45.779554+10:30[2023-11-23 14:26:45,779] <docker-entrypoint> INFO - Checking system.properties setup for container
2023-11-23 14:26:45.780362+10:30[2023-11-23 14:26:45,780] <docker-entrypoint> INFO - '/usr/lib/unifi/data/system.properties' doesn't exist, copying from '/usr/lib/unifi/system.properties.default'
2023-11-23 14:26:45.781200+10:30cp: cannot stat '/usr/lib/unifi/system.properties.default': No such file or directory

Application Configuration

CleanShot 2023-11-23 at 14 31 43

Describe the bug

Unifi has shifted upstream source and it appears there is a potential issue with this new image, that will prevent it being a drop-in replacement. Error as per events:


2023-11-23 14:26:45.780362+10:30[2023-11-23 14:26:45,780] <docker-entrypoint> INFO - '/usr/lib/unifi/data/system.properties' doesn't exist, copying from '/usr/lib/unifi/system.properties.default'
2023-11-23 14:26:45.781200+10:30cp: cannot stat '/usr/lib/unifi/system.properties.default': No such file or directo
```ry

### To Reproduce

Attempt upgrade of existing Unifi deployment, to version: 7.5.176
Attempt new deployment of Unifi 7.5.176 

### Expected Behavior

'/usr/lib/unifi/system.properties.default' needs to exist to allow copying (this may be an upstream issue, however the current issue will break existing unifi installs if attempted as the chart does not complete deploy and remains in th deploying state.

### Screenshots

![CleanShot 2023-11-23 at 14 37 16](https://github.com/truecharts/charts/assets/26401963/a378bb22-b10f-4217-ad7a-f2873d13686a)

### Additional Context

Nothing additional to add; changing the upstream unifi source is a breaking change, and currently does indeed break.

### I've read and agree with the following

- [X] I've checked all open and closed issues and my issue is not there.
kofeyh commented 10 months ago

Updated configuration to capture all app details (PVCs were missing from original screenshot, thx cobia). CleanShot 2023-11-23 at 15 07 17

Hedin commented 10 months ago

Same for me.

PrivatePuffin commented 10 months ago

Same for me.

+1 comments result in threadlick and temporary ban.

PrivatePuffin commented 10 months ago

Fix is not 100% correct.

PrivatePuffin commented 10 months ago

Fixed it, but will show-up load a clean-install.

Yours old data will reside in: /usr/lib/unifi/olddata" and can be moved to: /usr/lib/unifi Manually or using heavyscript