Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

fluxctctl list-workloads shows empty POLICY column #2602

Closed
2opremio opened this issue Nov 12, 2019 · 0 comments · Fixed by #2604
Closed

fluxctctl list-workloads shows empty POLICY column #2602

2opremio opened this issue Nov 12, 2019 · 0 comments · Fixed by #2604
Assignees
Labels

Comments

@2opremio
Copy link
Contributor

2opremio commented Nov 12, 2019

Describe the bug

When running https://github.com/weaveworks/flux-kustomize-example using --gitpath=production, fluxctl list-workloads -n demo using shows an empty POLICY column

WORKLOAD                 CONTAINER  IMAGE                       RELEASE   POLICY
demo:deployment/podinfo  podinfod   stefanprodan/podinfo:3.1.5  ready  
                         init       alpine:3.10.1  

The POLICY should be locked

To Reproduce

Run test 22_manifest_generation.bats in the master branch

E2E_TESTS='22_*' make e2e

Expected behavior

The output of fluxctl list-workloads -n demo should be

WORKLOAD                 CONTAINER  IMAGE                       RELEASE   POLICY
demo:deployment/podinfo  podinfod   stefanprodan/podinfo:3.1.5  ready     locked
                         init       alpine:3.10.1  

Logs

kubectl logs -n flux-e2e flux-678b8fd96d-4fntl

ts=2019-11-12T12:40:24.694233028Z caller=main.go:248 version=master-a0c6cb50
ts=2019-11-12T12:40:24.69430984Z caller=main.go:383 msg="using in cluster config to connect to the cluster"
ts=2019-11-12T12:40:24.747680612Z caller=main.go:468 component=cluster identity=/etc/fluxd/ssh/identity
ts=2019-11-12T12:40:24.747721544Z caller=main.go:469 component=cluster identity.pub="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMhk9a1yPiW7vpJoVz5oMpw4Z7jcM960K23TynijMwIUmWI7/Xq1X9JkqSHiYOT685uXoiT8i+V6kwwUlwK9dJL7yyZXlY+wp22aArBUdDKq0W1pyRELAIru0c9Pu0HuyqJdmEJsbzFD35otF91wunjC8oeGZnOT9RpMB261fvKzTwlv0Gpb5lIazUkjeV++gFnqwdyjG8MCHRUSiZ60nsBY2gNgr23puTpKT6nVSY6RdH7RO3RrVZjUkzHMufeVMp7FuTvbhoUMBw3WCTYadMwS/0j10mKF6rDa/45p0i3thWrSTnncxFaOuQWl9NpArJVGx2GeXzp2WexXJ2MEMb"
ts=2019-11-12T12:40:24.747746565Z caller=main.go:474 host=https://10.96.0.1:443 version=kubernetes-v1.15.5
ts=2019-11-12T12:40:24.747793307Z caller=main.go:486 kubectl=/usr/local/bin/kubectl
ts=2019-11-12T12:40:24.749377101Z caller=main.go:498 ping=true
ts=2019-11-12T12:40:24.761577111Z caller=main.go:633 url=ssh://git@gitsrv/git-server/repos/cluster.git user=Flux email=foo signing-key= verify-signatures=false sync-tag=flux state=git readonly=false notes-ref=flux set-author=false git-secret=false
ts=2019-11-12T12:40:24.762765244Z caller=main.go:736 upstream="no upstream URL given"
ts=2019-11-12T12:40:24.763408514Z caller=main.go:765 metrics-addr=:3031
ts=2019-11-12T12:40:24.781352037Z caller=loop.go:101 component=sync-loop err="git repo not ready: git repo has not been cloned yet"
ts=2019-11-12T12:40:24.781480996Z caller=images.go:17 component=sync-loop msg="polling for new images for automated workloads"
ts=2019-11-12T12:40:24.781491314Z caller=images.go:27 component=sync-loop msg="no automated workloads"
ts=2019-11-12T12:40:24.781955554Z caller=main.go:757 addr=:3030
ts=2019-11-12T12:40:25.303577138Z caller=checkpoint.go:24 component=checkpoint msg="up to date" latest=1.15.0
ts=2019-11-12T12:40:25.423696378Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://git@gitsrv/git-server/repos/cluster.git branch=master HEAD=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8
ts=2019-11-12T12:40:25.807890137Z caller=sync.go:479 method=Sync cmd=apply args= count=4
ts=2019-11-12T12:40:26.335411548Z caller=sync.go:545 method=Sync cmd="kubectl apply -f -" took=527.428188ms err=null output="namespace/demo created\nservice/podinfo created\ndeployment.apps/podinfo created\nhorizontalpodautoscaler.autoscaling/podinfo created"
ts=2019-11-12T12:40:26.337806773Z caller=daemon.go:685 component=daemon event="Sync: 46616e8, <cluster>:namespace/demo, demo:deployment/podinfo, demo:horizontalpodautoscaler/podinfo, demo:service/podinfo" logupstream=false
ts=2019-11-12T12:40:26.530449534Z caller=loop.go:220 component=sync-loop state="tag flux" old= new=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8
ts=2019-11-12T12:40:26.655711669Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://git@gitsrv/git-server/repos/cluster.git branch=master HEAD=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8
ts=2019-11-12T12:40:35.515586099Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://git@gitsrv/git-server/repos/cluster.git branch=master HEAD=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8
ts=2019-11-12T12:40:36.981710582Z caller=sync.go:479 method=Sync cmd=apply args= count=4
ts=2019-11-12T12:40:37.202880687Z caller=sync.go:545 method=Sync cmd="kubectl apply -f -" took=220.875648ms err=null output="namespace/demo unchanged\nservice/podinfo unchanged\ndeployment.apps/podinfo configured\nhorizontalpodautoscaler.autoscaling/podinfo unchanged"
ts=2019-11-12T12:40:45.641705197Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://git@gitsrv/git-server/repos/cluster.git branch=master HEAD=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8
ts=2019-11-12T12:40:47.542392612Z caller=sync.go:479 method=Sync cmd=apply args= count=4
ts=2019-11-12T12:40:47.751698086Z caller=sync.go:545 method=Sync cmd="kubectl apply -f -" took=209.159358ms err=null output="namespace/demo unchanged\nservice/podinfo unchanged\ndeployment.apps/podinfo configured\nhorizontalpodautoscaler.autoscaling/podinfo unchanged"
ts=2019-11-12T12:40:55.768532983Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://git@gitsrv/git-server/repos/cluster.git branch=master HEAD=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8
ts=2019-11-12T12:40:58.129720449Z caller=sync.go:479 method=Sync cmd=apply args= count=4
ts=2019-11-12T12:40:58.333785605Z caller=sync.go:545 method=Sync cmd="kubectl apply -f -" took=203.954182ms err=null output="namespace/demo unchanged\nservice/podinfo unchanged\ndeployment.apps/podinfo configured\nhorizontalpodautoscaler.autoscaling/podinfo unchanged"
ts=2019-11-12T12:41:05.866078319Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://git@gitsrv/git-server/repos/cluster.git branch=master HEAD=46616e86eabfcbc19b2b518ec10a6c48a9d10bc8

Additional context

It only fails in master, the 1.15 release works just fine, and master also works when reverting #2565 , so the problem must be there.

Also, the problem doesn't seem to happen with raw manifests, just with generated resources (e.g. while running 12_sync.bats, the output of fluxctl list-workloads is correct).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant