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

Components, operators and builders resources not created when installing Yatai with postgresql.enabled=false #205

Closed
amelki opened this issue Mar 28, 2022 · 10 comments

Comments

@amelki
Copy link

amelki commented Mar 28, 2022

When I install Yatai using the following values:

postgresql:
  enabled: false

externalPostgresql:
  host: <my RDS host>
  port: 5432
  user: <my username>
  password: <my password>
  database: yatai

none of the resources that should be created in components, operators and builders are created.
If I comment postgresql.enabled and reinstall (after having deleted all Yatai resources), then all components get created.
I can then upgrade with postgresql.enabled = false.

I tried the operation many times and consistently got the issue

Do you confirm the issue ? Am I missing something ?

@yubozhao
Copy link
Contributor

yubozhao commented Mar 28, 2022

Hey @amelki

Thank you for reporting the issue, really appreciate it. I am looking to the issue.

I would love you to clarify a few things for me

  1. What version of yatai chart you are using?
  2. did you have the database yatai created in your Postgresql?
  3. Are you able to access the yatai UI? Is the yatai service running successfully?
  4. if you are not able to, can you share with me the log of the crashed yatai service? You can find the crashed logs with
kubectl logs <POD_NAME> --previous -n yatai-system

@yubozhao
Copy link
Contributor

cc @yetone

@amelki
Copy link
Author

amelki commented Mar 28, 2022

Hey @yubozhao

  1. What version of yatai chart you are using?

The latest one, in https://bentoml.github.io/yatai-char

  1. did you have the database yatai created in your Postgresql?

Yes : I first installed Yatai with an embedded Postgresql. Then I upgraded with an external RDS, which created the yatai database at some point.
Then I deleted the Yatai release from my K8s cluster, but kept the yatai database in my RDS instance. And when I reinstall the helm chart, referencing my RDS instance, components, operators and builders resources are not created
Maybe this is the issue. Shall I retry from an empty RDS database ?

  1. Are you able to access the yatai UI? Is the yatai service running successfully?

If I install the charts with postgresql=true first, first and then upgrade with my external RDS, yes, I end up with a properly installed Yatai

  1. if you are not able to, can you share with me the log of the crashed yatai service? You can find the crashed logs with
kubectl logs <POD_NAME> --previous -n yatai-system

@yetone
Copy link
Member

yetone commented Mar 29, 2022

@amelki Yes, you should either retry from an empty RDS database or manually install the yatai deployment component in the yatai UI.

image

@yetone yetone closed this as completed Mar 29, 2022
@yubozhao yubozhao reopened this Mar 29, 2022
@yetone yetone added the bug Something isn't working label Mar 29, 2022
@amelki
Copy link
Author

amelki commented Mar 30, 2022

Guys, I see you reopened the issue. I just tried to reinstall Yatai with an empty RDS database, and it does not seem to work either... Do you confirm ?

@amelki
Copy link
Author

amelki commented Mar 30, 2022

OK, I had to manually create the yatai DB in my RDS instance, and it worked OK

@yetone yetone removed the bug Something isn't working label Mar 31, 2022
@yetone
Copy link
Member

yetone commented Apr 1, 2022

@amelki The thing is, when you tell yatai the name of the database, yatai will think that the database is already created

@amelki
Copy link
Author

amelki commented Apr 4, 2022

@yetone that is fine with me, I have adapted my install scripts to make sure the DB always exists and is empty when the helm charts are installed. I guess you can close the issue.

@parano
Copy link
Member

parano commented Apr 5, 2022

Thanks for the update @amelki - our team dive into the issue a bit more and this is definitely something we should improve in documentation. The root cause of the issue is due to installing Yatai helm chat with a database that has information on a previous installation. A regular installation from clean state should not run into this issue.

Yatai has a fairly complex architecture with multiple cluster components, both migrating to a new installation or reinstalling yatai from old DB requires a few extra steps to make sure the cluster state and DB state are in-sync. Our team will work on related documentation soon, as for now, we'd suggest try installing from a clean state as you did in your install script.

It sounds like you are trying to write a script that reinstalls Yatai, may I ask what is this used for? Is it for testing purpose?

@amelki
Copy link
Author

amelki commented Apr 5, 2022

Hi @parano, thanks for your answer.
Indeed I am writing a yatai install script, including creation of cloud resources (RDS, S3 bucket, secrets), so that I can install several development and testing environments in an automated way.

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

No branches or pull requests

5 participants