Closed william-lbn closed 1 month ago
neonvm-controller error :
{"level":"info","ts":"2024-04-17T07:57:34.045Z","msg":"Adding Finalizer for VirtualMachine","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"5bccee1b-3cf1-431e-96f7-10782877d6aa"}
{"level":"error","ts":"2024-04-17T07:57:34.059Z","msg":"Failed to update VirtualMachine status after reconcile loop","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"9bb70b2e-30b8-4e22-8b79-a9fea7f8e50c","virtualmachine":"postgres16-disk-test","error":"Operation cannot be fulfilled on virtualmachines.vm.neon.tech \"postgres16-disk-test\": the object has been modified; please apply your changes to the latest version and try again"}
{"level":"error","ts":"2024-04-17T07:57:34.059Z","msg":"Reconciler error","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"9bb70b2e-30b8-4e22-8b79-a9fea7f8e50c","error":"Operation cannot be fulfilled on virtualmachines.vm.neon.tech \"postgres16-disk-test\": the object has been modified; please apply your changes to the latest version and try again"}
{"level":"info","ts":"2024-04-17T07:57:34.059Z","msg":"Creating a new SSH Secret","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"ff6962c5-068c-48ef-b080-ae5c9b3ec155","Secret.Namespace":"default","Secret.Name":"ssh-neonvm-postgres16-disk-test"}
{"level":"info","ts":"2024-04-17T07:57:34.061Z","msg":"SSH Secret was created","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"ff6962c5-068c-48ef-b080-ae5c9b3ec155","Secret.Namespace":"default","Secret.Name":"ssh-neonvm-postgres16-disk-test"}
{"level":"info","ts":"2024-04-17T07:57:34.061Z","msg":"Creating a new Pod","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"ff6962c5-068c-48ef-b080-ae5c9b3ec155","Pod.Namespace":"default","Pod.Name":"postgres16-disk-test-cgf8w"}
{"level":"info","ts":"2024-04-17T07:57:34.066Z","msg":"Runner Pod was created","controller":"virtualmachine","controllerGroup":"vm.neon.tech","controllerKind":"VirtualMachine","VirtualMachine":{"name":"postgres16-disk-test","namespace":"default"},"namespace":"default","name":"postgres16-disk-test","reconcileID":"ff6962c5-068c-48ef-b080-ae5c9b3ec155","Pod.Namespace":"default","Pod.Name":"postgres16-disk-test-cgf8w"}
Operation cannot be fulfilled on virtualmachines.vm.neon.tech \"postgres16-disk-test\": the object has been modified; please apply your changes to the latest version and try again
What is the latest version?
Hi @william-lbn!
The important part is 2 Insufficient neonvm/kvm
I think you probably don't have /dev/kvm
on the node. Try enabling kvm on the node where you are running this or setting enableAcceleration: false
in the vm-deploy.yaml
if you are fine running without hardware virtualization.
In addition, which service of neon can postgres16-disk-test be compared to?
Our autoscaling runs computes, which are modified postgreses able to operate on top of the neon storage.
postgres16-disk-test is a vanilla postgres though, so that we can test it without setting up neon storage. You can check how it is constructed in the vm-builder spec
Is there a way to simulate scaling testing?
You can look at our autoscaling test and do the same steps by hand outside of kuttl.
What is the latest version?
neonvm-controller operates on VirtualMachine
CRD object. So, in this context, the version is the CRD object version. Small rate of transient reconciling failures is normal, neonvm-controller should auto-retry the reconciliation.
Hope this helps! Can you share the usecase you have in mind for neon autoscaling?
P. S. feel free to join our discord!
Hi @Omrigan
Thank you very much for your reply.
Hi @Omrigan
Thank you very much for your reply.
- Is the construction method of postgres image the same as postgres16-disk-test? Can the image built by compute in neon be used directly?
The main compute image is constructed in the same way as postgres16-disk-test. Here is the vm-builder spec: https://github.com/neondatabase/neon/blob/0353a72a00887173f802ba044d169a4c278ea8f8/vm-image-spec.yaml#L4
- There are relatively few neon documents, especially for building a complete set of documents on k8s (neon+autoscaling). I haven't deployed a complete environment yet, and without a deep understanding, I'm afraid it will be difficult to make very valuable suggestions. But I'm familiar with serverless faas. Neon has announced that it can scale to zero, but the goal of autoscaling is to dynamically change the amount of CPU and memory of a running postgres instance without interrupting the TCP connection with postgres. Is this contradictory to scaling to zero?
Yes, scaling while the VM is running and scaling-to-zero are different things. In the current "autoscaling" repo we don't handle scale-to-zero, it is handled external by control plane.
compute (postgres) is a stateless service, so it scales to zero and only connects and disconnects to the database at startup and end (first access requested). Did neon take special circumstances into consideration here?
What kind of special circumstances are you asking about?
- The autoscaling environment has been deployed, and neon can be quickly deployed through docker compose. I would like to ask, can neon and autoscaling be combined to see the entire scaling process? I am very interested in the field of database scaling, and think it is a difficult part of the resource optimization and scaling process, and I very much hope to participate in this project.
They sure can be combined, that's how we run it in production. Unfortunately, the full scale integration depends on control plane presence, which is not open source at the moment. So you'd have to write your own control plane to integrate everything.
Finally thank you again for your help.
You're welcome!
@william-lbn Will close this, feel free to reopen if more questions come up.
I followed https://github.com/neondatabase/autoscaling?tab=readme-ov-file#building-and-running
postgres16-disk-test always pending
autoscale-scheduler logs as follows
How can I make postgres16-disk-test scheduling successful?
I'm a beginner, thank you very much for your help.
In addition, which service of neon can postgres16-disk-test be compared to? Is there a way to simulate scaling testing?
Running pgbench
During Running pgbench, there were no neonvm resources, and an error occurred and exited.