Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(provider/init): check local cert expiration #246

Merged

Conversation

andy108369
Copy link
Collaborator

@andy108369 andy108369 commented Feb 19, 2024

Tested:

# kubectl -n akash-services logs akash-provider-0 -c init --tail=100 -f
...
+ openssl x509 -checkend 604800 -noout -in /config/provider.pem
+ rc=1
+ [[ 1 -ne 0 ]]
+ echo 'Certificate expires in less than 7 days, so going to generate a new one.'
+ GEN_NEW_CERT=0
Certificate expires in less than 7 days, so going to generate a new one.
Removing the old certificate before generating a new one
+ [[ 0 -eq 0 ]]
+ echo 'Removing the old certificate before generating a new one'
+ rm -vf /config/provider.pem
removed '/config/provider.pem'
Generating new provider certificate
+ echo 'Generating new provider certificate'
+ provider-services tx cert generate server provider.akash.pro
+ echo 'Publishing new provider certificate'
+ provider-services tx cert publish server
Publishing new provider certificate
{"height":"15082307","txhash":"EDB72062C4162B107907FA7C4AAD47944DD187715011A78942473BDAE737CD69","codespace":"","code":0,REDACTED

2nd run:

+ openssl x509 -checkend 604800 -noout -in /config/provider.pem
+ rc=0
+ [[ 0 -ne 0 ]]
+ [[ 1 -eq 0 ]]

@andy108369 andy108369 merged commit dc8513c into akash-network:main Feb 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant