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
Spinnaker shows old deleted k8s clusters in application and clusters tab #4803
Comments
I am seeing similar behavior. |
@perek thanks for reporting this issue! I think the problem stems from the fact that, for "logical" cache items (for example, Spinnaker clusters), the Kubernetes V2 provider relies on a 10-minute time to live (configured here) after which Redis will expire the entry. @robzienert does SQL-backed Clouddriver respect a cache item's configured |
Hi! It looks like the cache items' TTL is not honored by SQL. We're tracking this value, but there's no cleanup agent to actually remove stale items beyond on-demand cache items. This seems to be an oversight, since Netflix never removes accounts. It'd be neat if there could be help on this front, but if no one has capacity to add a cleanup agent, let me know and I'll swoop in and make it happen. |
This issue hasn't been updated in 45 days, so we are tagging it as 'stale'. If you want to remove this label, comment:
|
@spinnakerbot remove-label stale |
Hey all, sorry for the delayed followup on this one! @robzienert and I chatted offline and the tentative plan here is to implement an admin endpoint for ad-hoc cleanup of orphaned rows, and a feature flag that will let you opt in to automatic execution of that cleanup logic on startup. |
great news! , is there any tentative eta ? |
There is no ETA. I'm hoping to get something out for review before 2020, but where that lands for OSS releases, I'm unsure. In the meantime, there is a workaround, and it's how Netflix manages zero-downtime database changes for Clouddriver. WorkaroundWe do this by performing a red/black on Clouddriver. We do this by performing a red/black on Clouddriver. In order for this pattern to work, you must have at least broken Clouddriver up into two clusters:
Clouddriver SQL supports the concept of table namespaces, meaning you can red/black the database schema & contents. Since Clouddriver is largely ephemeral, switching table namespaces just means you're going to re-cache stuff. This table namespace is defined via a In our startup script for Clouddriver, we set an explicit value on # set sql table namespace
TABLE_NAMESPACE=" -Dsql.tableNamespace=a"
if [[ ${NETFLIX_CLUSTER} == *"-b" ]]; then
TABLE_NAMESPACE=" -Dsql.tableNamespace=b"
fi Our deployment pipeline has a parameter of This pipeline always deploys our caching agents first with a 5-minute wait stage following it before deploying any API clusters, to give time to the caching cluster to populate the database. YMMV on how long the wait stage should wait for. Example pipeline:
Once everything has been flipped over, you can delete (or truncate) the old tables. This workaround does have a decent amount of operations to it if you're not already setup to do this, but once setup, this process is a breeze and takes no manual effort beyond setting the |
Forgot to mention, the truncate admin endpoint on clouddriver: https://github.com/spinnaker/clouddriver/blob/master/cats/cats-sql/src/main/kotlin/com/netflix/spinnaker/cats/sql/controllers/CatsSqlAdminController.kt#L35 |
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Adds a background agent that regularly scans the database for cache records that are related to caching agents that do not exist anymore, and deletes them. This addresses spinnaker/spinnaker#4803 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Rob Zienert <rob@robzienert.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@robzienert added a disabled-by-default cleanup agent that will take care of purging entries from deleted accounts. You can enable the agent starting in 1.18, which will be released next week, by setting |
Issue Summary:
Deleting old clusters from the clouddriver config fails to remove their assets in certain views/apis.
Cloud Provider(s):
K8s, GKE
Environment:
1.15.1 - GKE - MySQL CloudDriver
Feature Area (if this issue is UI/UX related, please tag
@spinnaker/ui-ux-team
):Kubernetes CloudDriver, CloudDriver MySQL
Description:
We have noticed a bug when deleting old clusters from our cluster. It seems that the old clusters live on even after deploying the cluster with the config removed. While the clusters show in application and clusters tab, when clicking on the asset, the ui breaks as the api returns a 404 for the asset (pod, deployment, etc)
Steps to Reproduce:
-delete config for cluster
-deploy spinnaker minus cluster
Additional Details:
The text was updated successfully, but these errors were encountered: