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

Dynamic cpu consumption #13243

Merged
merged 1 commit into from
Sep 4, 2015
Merged

Conversation

socaa
Copy link

@socaa socaa commented Aug 27, 2015

Part of #11570

@piosz

@socaa socaa force-pushed the dynamic-cpu-consumption branch from 58c5a69 to 69f9c66 Compare August 27, 2015 08:28
@k8s-bot
Copy link

k8s-bot commented Aug 27, 2015

GCE e2e build/test passed for commit 58c5a694638f810e156c638b2801d26cea68ce87.

@k8s-bot
Copy link

k8s-bot commented Aug 27, 2015

GCE e2e build/test passed for commit 69f9c6619a334a1e9c4efd32dfeb9b5efcc7cb0e.

. "github.com/onsi/ginkgo"
)

// ConsumingRC is a tool for testing. It helps create specified usage of CPU or memory (Warnig: memory not supported)
Copy link
Contributor

Choose a reason for hiding this comment

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

No extra indent.

Copy link
Author

Choose a reason for hiding this comment

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

done

@socaa
Copy link
Author

socaa commented Aug 28, 2015

PTAL

@piosz
@mwielgus

@k8s-bot
Copy link

k8s-bot commented Aug 28, 2015

GCE e2e build/test passed for commit 5bac8bcff6d50fbfbb407a3959742f43a8ae43c4.

type ConsumingRC struct {
name string
milicores int
mutex *sync.Mutex
Copy link
Contributor

Choose a reason for hiding this comment

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

Here was a comment but I apparently didn't click on "Send".

Why do we need this mutex at all? If this is only for testing can we have this single-threaded or using classic go synchronization (via channels).

Copy link
Author

Choose a reason for hiding this comment

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

done via channels

@socaa
Copy link
Author

socaa commented Aug 28, 2015

PTAL

@piosz
@mwielgus

rc.channel <- milicores
}

func (rc *ConsumingRC) consumeCPU() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we name this func a bit different - right now there are 2 methods with the same name that do completely different thing.

@k8s-bot
Copy link

k8s-bot commented Aug 28, 2015

GCE e2e build/test passed for commit 83abdc27eab88ce0ce325e3bbf339348325748fa.

if rest != 0 {
go rc.sendOneConsumeCPUrequest(rest, consumptionTimeInSeconds)
}
time.Sleep(sleepTime)
Copy link
Contributor

Choose a reason for hiding this comment

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

Having sleep here will probably cause problems with setting the number of millicores - the go routine is blocked here. As the rc.channel is unbuffered the sender of the update will have to wait until the sleep ends.

@socaa
Copy link
Author

socaa commented Aug 31, 2015

PTAL

@piosz
@mwielgus

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-bot
Copy link

k8s-bot commented Sep 2, 2015

GCE e2e build/test failed for commit 0eac84970ab371114b522c9f453fb581508e8a4f.

@socaa
Copy link
Author

socaa commented Sep 2, 2015

PTAL

@piosz
@mwielgus

@k8s-bot
Copy link

k8s-bot commented Sep 2, 2015

GCE e2e build/test failed for commit de8ca71d0dab7c9655840810ed656bef8b8e7380.

@mwielgus
Copy link
Contributor

mwielgus commented Sep 2, 2015

LGTM, please squash the commits.

@socaa socaa force-pushed the dynamic-cpu-consumption branch from de8ca71 to be61507 Compare September 2, 2015 09:50
@socaa
Copy link
Author

socaa commented Sep 2, 2015

Done

@mwielgus

@k8s-bot
Copy link

k8s-bot commented Sep 2, 2015

GCE e2e build/test failed for commit be61507456f9be615a974182de0a1bc6359e00b7.

@jszczepkowski jszczepkowski added lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-merge labels Sep 3, 2015
@jszczepkowski
Copy link
Contributor

@k8s-bot test this please

stop chan int
}

// creates new ConsumingRC
Copy link
Contributor

Choose a reason for hiding this comment

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

Comments are in wrong format, method name should go first:
// NewConsumingRC creates new ConsumingRC.

@jszczepkowski jszczepkowski removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 2015
@socaa socaa force-pushed the dynamic-cpu-consumption branch from be61507 to 4f282ef Compare September 3, 2015 07:17
@socaa
Copy link
Author

socaa commented Sep 3, 2015

PTAL

@jszczepkowski

@jszczepkowski
Copy link
Contributor

LGTM

@jszczepkowski jszczepkowski added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 2015
@k8s-bot
Copy link

k8s-bot commented Sep 3, 2015

GCE e2e build/test failed for commit be61507456f9be615a974182de0a1bc6359e00b7.

@k8s-bot
Copy link

k8s-bot commented Sep 3, 2015

GCE e2e build/test passed for commit 4f282ef.

@k8s-github-robot
Copy link

@k8s-bot test this [testing build queue, sorry for the noise]

@k8s-bot
Copy link

k8s-bot commented Sep 3, 2015

GCE e2e build/test failed for commit 4f282ef.

@ghost
Copy link

ghost commented Sep 4, 2015

Jenkins e2e failure looks like a flake. Retrying.
@k8s-bot test this again please

Error response from daemon: invalid registry endpoint https://gcr.io/v0/: unable to ping registry endpoint https://gcr.io/v0/
v2 ping attempt failed with error: Get https://gcr.io/v2/: read tcp 74.125.69.82:443: i/o timeout
 v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp 74.125.69.82:443: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add`--insecure-registry gcr.io` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/gcr.io/ca.crt
!!! Error in /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:734
  'docker pull "${addon_path}"' exited with status 1
Call stack:
  1: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:734 kube::release::write_addon_docker_images_for_server(...)
  2: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:651 kube::release::package_server_tarballs(...)
  3: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:586 kube::release::package_tarballs(...)
  4: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/release.sh:40 main(...)
Exiting with status 1
!!! [0903 14:31:42] unable to pull or write addon image
!!! Error in /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:725
  'kube::release::write_addon_docker_images_for_server "${release_stage}/addons"' exited with status 1
Call stack:
  1: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:725 kube::release::write_addon_docker_images_for_server(...)
  2: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:651 kube::release::package_server_tarballs(...)
  3: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/../build/common.sh:586 kube::release::package_tarballs(...)
  4: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/release.sh:40 main(...)
Exiting with status 1
!!! [0903 14:31:42] previous tarball phase failed
!!! Error in /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/release.sh:588
  'return 1' exited with status 1
Call stack:
  1: /jenkins-master-data/jobs/kubernetes-pull-build-test-e2e-gce/workspace/hack/e2e-internal/../../cluster/gce/../../cluster/../build/release.sh:588 main(...)
Exiting with status 1
2015/09/03 14:31:42 Error running build-release: exit status 1
2015/09/03 14:31:42 Error building. Aborting.
exit status 1
Build step 'Execute shell' marked build as failure

@k8s-bot
Copy link

k8s-bot commented Sep 4, 2015

GCE e2e build/test failed for commit 4f282ef.

@piosz
Copy link
Member

piosz commented Sep 4, 2015

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Sep 4, 2015

GCE e2e build/test passed for commit 4f282ef.

piosz added a commit that referenced this pull request Sep 4, 2015
@piosz piosz merged commit e724a52 into kubernetes:master Sep 4, 2015
@piosz piosz mentioned this pull request Sep 4, 2015
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants