Bug 1328373 - Deployer should try to delete deamonset and server roles before processing the logging-fluentd-template
Summary: Deployer should try to delete deamonset and server roles before processing th...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Logging
Version: 3.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: chunchen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-19 08:48 UTC by Xia Zhao
Modified: 2016-09-30 02:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 15:22:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xia Zhao 2016-04-19 08:48:54 UTC
Problem description: 
In case for a redeployment inside the same logging project, deployer will fail because ds and server roles already exist. Deployer should try to delete them before creation.

Version-Release number of selected component (if applicable):
Images built from https://github.com/openshift/origin-aggregated-logging

How reproducible:
Always

Steps to Reproduce:
1. Deploy logging system according to https://github.com/openshift/origin-aggregated-logging/tree/master/deployment#using-the-logging-deployer
2. Redeploy it in the same project again, check the deployer pod status

Actual Result:
$ oc get po
NAME                     READY     STATUS      RESTARTS   AGE
logging-deployer-1ed4e   0/1       Error       0          28m
pod log said that "Error from server: daemonsets.extensions "logging-fluentd" already exists"
Deleted fluentd ds and retry with deployer, get error messages #2:
serviceaccount "logging-deployer" created
Error from server: role "oauth-editor" already exists
Error from server: role "daemonset-admin" already exists

Expected Result:
Deployer should try to delete the fluentd deamonset  and server roles before processing the logging-fluentd-template 

Additional info:

Comment 1 Luke Meyer 2016-04-19 13:23:20 UTC
I think we just need to publish another origin deployer image.

The deployer should delete the fluentd daemonset before proceeding, yes. I don't know why even an old version wouldn't... very strange.

The creation of the service accounts and roles is now intended to happen only once. The deployer will not delete or re-create them. So when running repeated deployments, you only need to process the logging-deployer-account-template the first time. You can process it again and it will just do nothing and print errors, which is fine.

I'll smoke test and put this on_qa when we have a newer image.

Comment 2 Xia Zhao 2016-04-20 03:28:00 UTC
I removed step "oc new-app logging-deployer-account-template" and the re-deployment succeeded with this latest deployer image:
docker.io/openshift/origin-logging-deployment      latest              ed54b03c2eba        11 hours ago        699.8 MB

Setting to verified. Thanks!


Note You need to log in before you can comment on or make changes to this bug.