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

Implement update #11

Merged
merged 2 commits into from May 10, 2019
Merged

Conversation

enxebre
Copy link
Member

@enxebre enxebre commented May 10, 2019

Existing machine:

I0510 11:18:11.794616   54428 controller.go:129] Reconciling Machine "agl060519-rnvnt-test-gcp-22"
I0510 11:18:11.794643   54428 controller.go:292] Machine "agl060519-rnvnt-test-gcp-22" in namespace "test-gcp" doesn't specify "cluster.k8s.io/cluster-name" label, assuming nil cluster
I0510 11:18:11.794657   54428 actuator.go:52] Checking if machine "agl060519-rnvnt-test-gcp-22" exists
I0510 11:18:12.614139   54428 reconciler.go:217] Machine "agl060519-rnvnt-test-gcp-22" already exists
I0510 11:18:12.614178   54428 controller.go:237] Reconciling machine "agl060519-rnvnt-test-gcp-22" triggers idempotent update
I0510 11:18:12.614224   54428 actuator.go:65] Updating machine "agl060519-rnvnt-test-gcp-22"
I0510 11:18:12.614843   54428 reconciler.go:135] Reconciling machine object "agl060519-rnvnt-test-gcp-22" with cloud state
I0510 11:18:14.220448   54428 machine_scope.go:118] Storing machine spec for "agl060519-rnvnt-test-gcp-22", resourceVersion: 602927, generation: 4
I0510 11:18:14.426720   54428 machine_scope.go:129] Storing machine status for "agl060519-rnvnt-test-gcp-22", resourceVersion: 602927, generation: 4

New machine:

I0510 11:19:25.204705   54428 controller.go:129] Reconciling Machine "agl060519-rnvnt-test-gcp-29"
I0510 11:19:25.204729   54428 controller.go:292] Machine "agl060519-rnvnt-test-gcp-29" in namespace "test-gcp" doesn't specify "cluster.k8s.io/cluster-name" label, assuming nil cluster
I0510 11:19:25.442691   54428 controller.go:129] Reconciling Machine "agl060519-rnvnt-test-gcp-29"
I0510 11:19:25.442834   54428 controller.go:292] Machine "agl060519-rnvnt-test-gcp-29" in namespace "test-gcp" doesn't specify "cluster.k8s.io/cluster-name" label, assuming nil cluster
I0510 11:19:25.442850   54428 actuator.go:52] Checking if machine "agl060519-rnvnt-test-gcp-29" exists
I0510 11:19:26.240265   54428 reconciler.go:221] Machine "agl060519-rnvnt-test-gcp-29" does not exist
I0510 11:19:26.240315   54428 controller.go:246] Reconciling machine object agl060519-rnvnt-test-gcp-29 triggers idempotent create.
I0510 11:19:26.240334   54428 actuator.go:36] Creating machine "agl060519-rnvnt-test-gcp-29"
I0510 11:19:45.493834   54428 reconciler.go:182] Waiting for operation to be completed... (status: RUNNING)
I0510 11:19:50.930979   54428 reconciler.go:182] Waiting for operation to be completed... (status: RUNNING)
I0510 11:19:55.530457   54428 reconciler.go:182] Waiting for operation to be completed... (status: RUNNING)
I0510 11:20:00.649094   54428 reconciler.go:182] Waiting for operation to be completed... (status: DONE)
I0510 11:20:00.649141   54428 reconciler.go:135] Reconciling machine object "agl060519-rnvnt-test-gcp-29" with cloud state
I0510 11:20:00.956411   54428 machine_scope.go:118] Storing machine spec for "agl060519-rnvnt-test-gcp-29", resourceVersion: 609721, generation: 2
I0510 11:20:01.164518   54428 machine_scope.go:129] Storing machine status for "agl060519-rnvnt-test-gcp-29", resourceVersion: 609721, generation: 2
I0510 11:20:01.366856   54428 controller.go:129] Reconciling Machine "agl060519-rnvnt-test-gcp-29"
I0510 11:20:01.366932   54428 controller.go:292] Machine "agl060519-rnvnt-test-gcp-29" in namespace "test-gcp" doesn't specify "cluster.k8s.io/cluster-name" label, assuming nil cluster
I0510 11:20:01.367021   54428 actuator.go:52] Checking if machine "agl060519-rnvnt-test-gcp-29" exists
I0510 11:20:02.183481   54428 reconciler.go:217] Machine "agl060519-rnvnt-test-gcp-29" already exists
I0510 11:20:02.183511   54428 controller.go:237] Reconciling machine "agl060519-rnvnt-test-gcp-29" triggers idempotent update
I0510 11:20:02.183521   54428 actuator.go:65] Updating machine "agl060519-rnvnt-test-gcp-29"
I0510 11:20:02.184006   54428 reconciler.go:135] Reconciling machine object "agl060519-rnvnt-test-gcp-29" with cloud state
I0510 11:20:02.697124   54428 machine_scope.go:118] Storing machine spec for "agl060519-rnvnt-test-gcp-29", resourceVersion: 609852, generation: 3
E0510 11:20:02.900935   54428 machine_scope.go:102] [machinescope] failed to update machine "agl060519-rnvnt-test-gcp-29" in namespace "test-gcp": Operation cannot be fulfilled on machines.machine.openshift.io "agl060519-rnvnt-test-gcp-29": the object has been modified; please apply your changes to the latest version and try again
I0510 11:20:02.901008   54428 controller.go:129] Reconciling Machine "agl060519-rnvnt-test-gcp-29"
I0510 11:20:02.901021   54428 controller.go:292] Machine "agl060519-rnvnt-test-gcp-29" in namespace "test-gcp" doesn't specify "cluster.k8s.io/cluster-name" label, assuming nil cluster
I0510 11:20:02.901033   54428 actuator.go:52] Checking if machine "agl060519-rnvnt-test-gcp-29" exists
I0510 11:20:03.610856   54428 reconciler.go:217] Machine "agl060519-rnvnt-test-gcp-29" already exists
I0510 11:20:03.610885   54428 controller.go:237] Reconciling machine "agl060519-rnvnt-test-gcp-29" triggers idempotent update
I0510 11:20:03.610896   54428 actuator.go:65] Updating machine "agl060519-rnvnt-test-gcp-29"
I0510 11:20:03.611427   54428 reconciler.go:135] Reconciling machine object "agl060519-rnvnt-test-gcp-29" with cloud state
I0510 11:20:04.077722   54428 machine_scope.go:118] Storing machine spec for "agl060519-rnvnt-test-gcp-29", resourceVersion: 609853, generation: 3
I0510 11:20:04.287220   54428 machine_scope.go:129] Storing machine status for "agl060519-rnvnt-test-gcp-29", resourceVersion: 609853, generation: 3

status:

apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"machine.openshift.io/v1beta1","kind":"Machine","metadata":{"annotations":{},"labels":{"machine.openshift.io/cluster-api-cluster":"agl060519-rnvnt","machine.openshift.io/cluster-api-machine-role":"test-gcp","machine.openshift.io/cluster-api-machine-type":"test-gcp"},"name":"agl060519-rnvnt-test-gcp-29","namespace":"test-gcp"},"spec":{"providerSpec":{"value":{"apiVersion":"gcpproviderconfig.openshift.io/v1beta1","canIPForward":true,"credentialsSecret":{"name":"test"},"deletionProtection":false,"disks":[{"autoDelete":true,"boot":true,"image":"projects/coreos-cloud/global/images/coreos-stable-2079-3-0-v20190423","sizeGb":10,"type":"pd-standard"}],"machineType":"n1-standard-1","networkInterfaces":[{"subnetwork":"gcp-actuator-test-subnet"}],"region":"us-east1","zone":"us-east1-b"}}}}
  creationTimestamp: "2019-05-10T09:19:25Z"
  finalizers:
  - machine.machine.openshift.io
  generation: 3
  labels:
    machine.openshift.io/cluster-api-cluster: agl060519-rnvnt
    machine.openshift.io/cluster-api-machine-role: test-gcp
    machine.openshift.io/cluster-api-machine-type: test-gcp
  name: agl060519-rnvnt-test-gcp-29
  namespace: test-gcp
  resourceVersion: "609853"
  selfLink: /apis/machine.openshift.io/v1beta1/namespaces/test-gcp/machines/agl060519-rnvnt-test-gcp-29
  uid: b42a26f4-7304-11e9-81bd-026e1c242ada
spec:
  metadata:
    creationTimestamp: null
  providerID: gce://openshift-gce-devel/us-east1-b/agl060519-rnvnt-test-gcp-29
  providerSpec:
    value:
      apiVersion: gcpproviderconfig.openshift.io/v1beta1
      canIPForward: true
      credentialsSecret:
        name: test
      deletionProtection: false
      disks:
      - autoDelete: true
        boot: true
        image: projects/coreos-cloud/global/images/coreos-stable-2079-3-0-v20190423
        labels: null
        sizeGb: 10
        type: pd-standard
      machineType: n1-standard-1
      metadata:
        creationTimestamp: null
      networkInterfaces:
      - subnetwork: gcp-actuator-test-subnet
      region: us-east1
      serviceAccounts: null
      zone: us-east1-b
status:
  addresses:
  - address: 10.0.0.31
    type: InternalIP
  - address: 34.73.63.53
    type: ExternalIP
  providerStatus:
    instanceId: agl060519-rnvnt-test-gcp-29
    instanceState: RUNNING
    metadata:
      creationTimestamp: null

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 10, 2019
// If exists() would store machineSpec/status object then create()/update() would still receive the local version.
// When create()/update() try to store machineSpec/status this might result in
// "Operation cannot be fulfilled; the object has been modified; please apply your changes to the latest version and try again."
// Therefore we don't close the scope here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question then becomes: when is the scope closed? Can we document where/when?

@frobware
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2019
@openshift-merge-robot openshift-merge-robot merged commit 6aa44e6 into openshift:master May 10, 2019
RadekManak pushed a commit to RadekManak/cluster-api-provider-gcp that referenced this pull request Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants