[ICN-611] 'make kud_bm_deploy_mini' fails with secrets not found Created: 27/Aug/21  Updated: 27/Aug/21

Status: To Do
Project: Integrated Cloud Native NFV
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Geoffroy Van Cutsem Assignee: Kuralamudhan Ramakrishnan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

After a failed deployment of Akraino ICN, I see the following error coming up when running the 'make kud_bm_deploy_mini' step:

...
Apply Multus Daemonset ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.16s
Run the test cases if testing_enabled is set to true.
Add-ons deployment complete...
Edit cancelled, no changes made.
service/kubernetes-dashboard edited
~/icn/deploy/kud
Error from server (NotFound): secrets "default-token-g4fx7" not found
Makefile:69: recipe for target 'kud_bm_deploy_mini' failed
make: *** [kud_bm_deploy_mini] Error 1

This is happening in the 'verifier' function of the 'deploy/kud/kud_bm_launch.sh' that is called by that Makefile target.

Looking up the'serviceaccount', I see

$ sudo kubectl get serviceaccount default -o json
{
"apiVersion": "v1",
"kind": "ServiceAccount",
"metadata":

Unknown macro: { "creationTimestamp"}

,
"secrets": [

Unknown macro: { "name"}

,

Unknown macro: { "name"}

,

Unknown macro: { "name"}

]

There are three tokens listed in there. BUT, looking up the secrets:

$ sudo kubectl get secrets
NAME TYPE DATA AGE
bpa-operator-token-xgpqw kubernetes.io/service-account-token 3 7d16h
default-token-j7pfx kubernetes.io/service-account-token 3 28m
ssh-key-secret Opaque 2 7d16h

The default token that's listed in there is valid but the logic in the 'verifier' function only tries to use the first one from the default serviceaccount (i.e. .secrets[0].name), whereas the valid token is in third position.

 

I don not know what is causing these tokens to be added but deleting the extraneous ones so as to keep only the one listed by 'kubectl get secrets' will allow 'make kud_bm_deploy_mini' to succeed.

To delete the extra tokens: 'sudo kubectl edit serviceaccount default' and remove the lines with the tokens that are not valid.


Generated at Sat Feb 10 06:01:22 UTC 2024 using Jira 9.4.5#940005-sha1:e3094934eac4fd8653cf39da58f39364fb9cc7c1.