-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
creating from template or console causes a build to occur......... a long time later #1738
Comments
I was watching logs but I don't think controller or image_change are telling me when the build starts:
I'm not sure what to grep for to see when the resources were defined (via adding from console) and when the build started.
|
creation of template:
start of build:
OK, that's less than 60 seconds, but even 20 seconds is still confusing to the user, I would think. |
Hi, when I go through the "wiring" example in beta3 training doc, I found the build was not started automatically after run "osc create -f frontend-config.json". Couldn't get any build running even wait for several minutes. |
@gpei your problems with mysql are because of #1740 We have to fix the db template still. The current iteration of the db template has some old workarounds for selinux+docker 1.4 See: #1740 (comment) |
@smarterclayton my first guess would be that this relates to the import of the images not happening (or taking a long time), since that's what's really required to trigger a build here. @gpei and @thoraxe can you dump osc get imagestreams -o json for your namespace while you're waiting for the build to show up? also @thoraxe i have a request to @mnagy and @jhadvig to significantly enhance the log traceability of the build flow (when verbose logs are enabled) as part of some other work they are doing this sprint, so hopefully that will address your concern there. |
Specifically look for the annotation about image import and the timestamp it provides there relative to the creation timestamp of the image stream. ----- Original Message -----
|
@bparees Just like this. |
your ruby-20-centos7 imagestream does not look right, it should be coming from dockerup and not your local registry. What does your ImageSTream look like in your template? It should be: { |
I was using this template https://github.com/openshift/training/blob/beta3/beta3/frontend-template.json |
@gpei that seems like a problem with the template definition, since it's ImageRepository does not point to a registry, it's going to use the default registry. Not sure if that's the intent of the sample or not, @thoraxe ? if it is the intent, you won't get a build until you manually trigger one, or you push an image tagged as 172.30.17.59:5000/wiring/ruby-20-centos7 |
{
"apiVersion": "v1beta1",
"items": [
{
"apiVersion": "v1beta1",
"containerPort": 8080,
"id": "frontend",
"kind": "Service",
"port": 5432,
"selector": {
"name": "frontend"
}
},
{
"apiVersion": "v1beta1",
"host": "wiring.cloudapps.example.com",
"id": "sample-app-secure",
"kind": "Route",
"metadata": {
"name": "route-edge"
},
"serviceName": "frontend"
},
{
"apiVersion": "v1beta1",
"kind": "ImageRepository",
"metadata": {
"name": "origin-ruby-sample"
}
},
{
"apiVersion": "v1beta1",
"kind": "ImageRepository",
"metadata": {
"name": "ruby-20-centos7"
}
},
{
"apiVersion": "v1beta1",
"kind": "BuildConfig",
"labels": {
"name": "ruby-sample-build"
},
"metadata": {
"name": "ruby-sample-build"
},
"parameters": {
"output": {
"to": {
"name": "origin-ruby-sample"
}
},
"source": {
"git": {
"uri": "git://github.com/openshift/ruby-hello-world.git",
"ref": "beta2"
},
"type": "Git"
},
"strategy": {
"stiStrategy": {
"image": "openshift/ruby-20-centos7"
},
"type": "STI"
}
},
"triggers": [
{
"github": {
"secret": "secret101"
},
"type": "github"
},
{
"generic": {
"secret": "secret101"
},
"type": "generic"
},
{
"imageChange": {
"from": {
"name": "ruby-20-centos7"
},
"image": "openshift/ruby-20-centos7",
"tag": "latest"
},
"type": "imageChange"
}
]
},
{
"apiVersion": "v1beta1",
"kind": "DeploymentConfig",
"metadata": {
"name": "frontend"
},
"template": {
"controllerTemplate": {
"podTemplate": {
"desiredState": {
"manifest": {
"containers": [
{
"env": [
{
"name": "ADMIN_USERNAME",
"value": "${ADMIN_USERNAME}"
},
{
"name": "ADMIN_PASSWORD",
"value": "${ADMIN_PASSWORD}"
},
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
}
],
"image": "origin-ruby-sample",
"name": "ruby-helloworld",
"ports": [
{
"containerPort": 8080
}
]
}
],
"version": "v1beta1"
}
},
"labels": {
"name": "frontend"
}
},
"replicaSelector": {
"name": "frontend"
},
"replicas": 1
},
"strategy": {
"type": "Recreate"
}
},
"triggers": [
{
"imageChangeParams": {
"automatic": true,
"containerNames": [
"ruby-helloworld"
],
"from": {
"name": "origin-ruby-sample"
},
"tag": "latest"
},
"type": "ImageChange"
}
]
}
],
"kind": "Template",
"metadata": {
"annotations": {
"description": "This frontend template will be used to demonstrate parameters"
},
"name": "frontend-app-template"
},
"parameters": [
{
"description": "administrator username",
"from": "admin[A-Z0-9]{3}",
"generate": "expression",
"name": "ADMIN_USERNAME"
},
{
"description": "administrator password",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression",
"name": "ADMIN_PASSWORD"
},
{
"description": "database password",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression",
"name": "MYSQL_PASSWORD"
},
{
"description": "database name",
"name": "MYSQL_DATABASE",
"value": "example"
},
{ "description": "database user",
"name": "MYSQL_USER",
"value": "example"
}
],
"labels": {
"template": "application-template-stibuild"
}
} This is just the sample app template cut into two pieces. This is the frontend portion by itself. Processing and creating this does not seem to auto generate a build. I think it's because it uses |
Triggers should work with both ImageRepository and ImageStream. If not, let me know. |
With the above json based on IR and the old stuff, it doesn't trigger a build. Updating to the following JSON results in a build being triggered immediately {
"apiVersion": "v1beta1",
"items": [
{
"apiVersion": "v1beta1",
"containerPort": 8080,
"id": "frontend",
"kind": "Service",
"port": 5432,
"selector": {
"name": "frontend"
}
},
{
"apiVersion": "v1beta1",
"host": "integrated.cloudapps.example.com",
"id": "sample-app-secure",
"kind": "Route",
"metadata": {
"name": "route-edge"
},
"serviceName": "frontend"
},
{
"apiVersion": "v1beta1",
"kind": "ImageStream",
"metadata": {
"name": "origin-ruby-sample"
}
},
{
"apiVersion": "v1beta1",
"kind": "ImageStream",
"metadata": {
"name": "ruby-20-centos7"
},
"spec": {
"dockerImageRepository": "openshift/ruby-20-centos7"
}
},
{
"apiVersion": "v1beta1",
"kind": "BuildConfig",
"metadata": {
"name": "ruby-sample-build",
"labels": {
"name": "ruby-sample-build"
}
},
"parameters": {
"output": {
"to": {
"name": "origin-ruby-sample"
}
},
"source": {
"git": {
"uri": "git://github.com/openshift/ruby-hello-world.git",
"ref": "beta3"
},
"type": "Git"
},
"strategy": {
"stiStrategy": {
"image": "openshift/ruby-20-centos7"
},
"type": "STI"
}
},
"triggers": [
{
"github": {
"secret": "secret101"
},
"type": "github"
},
{
"generic": {
"secret": "secret101"
},
"type": "generic"
},
{
"imageChange": {
"from": {
"name": "ruby-20-centos7"
},
"image": "openshift/ruby-20-centos7",
"tag": "latest"
},
"type": "imageChange"
}
]
},
{
"apiVersion": "v1beta1",
"kind": "DeploymentConfig",
"metadata": {
"name": "frontend"
},
"template": {
"controllerTemplate": {
"podTemplate": {
"desiredState": {
"manifest": {
"containers": [
{
"env": [
{
"name": "ADMIN_USERNAME",
"value": "${ADMIN_USERNAME}"
},
{
"name": "ADMIN_PASSWORD",
"value": "${ADMIN_PASSWORD}"
},
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
}
],
"image": "origin-ruby-sample",
"name": "ruby-helloworld",
"ports": [
{
"containerPort": 8080
}
]
}
],
"version": "v1beta1"
}
},
"labels": {
"name": "frontend"
}
},
"replicaSelector": {
"name": "frontend"
},
"replicas": 1
},
"strategy": {
"type": "Recreate",
"recreateParams": {
"pre": {
"failurePolicy": "Abort",
"execNewPod": {
"containerName": "ruby-helloworld",
"command": [
"/bin/true"
],
"env": [
{
"name": "CUSTOM_VAR1",
"value": "custom_value1"
}
]
}
},
"post": {
"failurePolicy": "Ignore",
"execNewPod": {
"containerName": "ruby-helloworld",
"command": [
"/bin/false"
],
"env": [
{
"name": "CUSTOM_VAR2",
"value": "custom_value2"
}
]
}
}
}
}
},
"triggers": [
{
"imageChangeParams": {
"automatic": true,
"containerNames": [
"ruby-helloworld"
],
"from": {
"name": "origin-ruby-sample"
},
"tag": "latest"
},
"type": "ImageChange"
}
]
}
],
"kind": "Template",
"metadata": {
"annotations": {
"description": "This is a hand-wiring example for an application"
},
"name": "wiring-frontend-example"
},
"parameters": [
{
"description": "administrator username",
"from": "admin[A-Z0-9]{3}",
"generate": "expression",
"name": "ADMIN_USERNAME"
},
{
"description": "administrator password",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression",
"name": "ADMIN_PASSWORD"
},
{
"description": "database username",
"from": "user[A-Z0-9]{3}",
"generate": "expression",
"name": "MYSQL_USER"
},
{
"description": "database password",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression",
"name": "MYSQL_PASSWORD"
},
{
"description": "database name",
"name": "MYSQL_DATABASE",
"value": "root"
}
],
"labels": {
"template": "application-template-stibuild"
}
} |
@thoraxe what's the difference between the old and new json? |
imagestream vs imagerepository |
probably related to this bug: which is going to get totally refactored by this PR: |
I think the key difference is setting the dockerImageRepository for ruby-20-centos7. It didn't look like that was set in the old version. |
I think @ncdc is right, when using ImageRepository it should look like: { |
OK, this is related to IS vs IR so I will close. |
…service-catalog/' changes from b758460ba7..c3e3071633 c3e3071633 origin build: add origin tooling 97ddbab chart changes for v0.1.9 (openshift#1776) b5168a7 Add unit tests for class, instance, plan backends in svcat (openshift#1763) 97d11cb prometheus: only return catalog specific metrics (openshift#1774) 0fb00e3 Bump dependency on go-open-service-broker-client to 0.0.4 (openshift#1775) 0a9f1e4 Reset RemovedFromBrokerCatalog when broker re-adds a removed service class (openshift#1770) 28ec5ed Bump dependency on go-open-service-broker-client to 0.0.3 (openshift#1768) ca83d18 handle binding deletion that occurs during async bind (openshift#1760) 858d467 2 of 4 fixes for golang 1.10 (openshift#1764) 656156b Add unit tests for binding and broker backends in svcat ec05486 In svcat verify service instance exists on unbind (openshift#1750) e6315a4 fix indentation from openshift#1725 (openshift#1759) 62284da Publish svcat binaries during build (openshift#1725) 8f986ae also build with golang tip and allow tip to fail (openshift#1734) 127561e use pvc for etcd volume (openshift#1684) 7d155e5 Ensure only href-checker runs on docs only commit (openshift#1693) 4ea44c4 log the version and build date on server startup (openshift#1746) 0db9519 allow getting and describing plans with class/plan name combo in svcat (openshift#1743) b1da783 print schemas when describing plan in svcat (openshift#1740) 7a7fcce Add constraint for go-open-service-broker-client (openshift#1738) 3070003 Increase timeout for broker condition polling in e2e (openshift#1745) b6878f7 Avoid Setting Authentication header twice (openshift#1685) 5317111 wrap "rm -rf" with docker (openshift#1735) d7c0bf2 Allow upper case letters in Plan names (openshift#1668) 6b27ba6 Add a constraint on go-autorest (openshift#1732) b3de6ec Added validation for ServiceBinding spec ParametersFrom REVERT: b758460ba7 origin build: modify hard coded path REVERT: 871582f73a origin build: add origin tooling git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog git-subtree-split: c3e3071633b91541cf9f1000d2d5115cdd31de1b
…service-catalog/' changes from b758460ba7..c3e3071633 c3e3071633 origin build: add origin tooling 97ddbab chart changes for v0.1.9 (openshift#1776) b5168a7 Add unit tests for class, instance, plan backends in svcat (openshift#1763) 97d11cb prometheus: only return catalog specific metrics (openshift#1774) 0fb00e3 Bump dependency on go-open-service-broker-client to 0.0.4 (openshift#1775) 0a9f1e4 Reset RemovedFromBrokerCatalog when broker re-adds a removed service class (openshift#1770) 28ec5ed Bump dependency on go-open-service-broker-client to 0.0.3 (openshift#1768) ca83d18 handle binding deletion that occurs during async bind (openshift#1760) 858d467 2 of 4 fixes for golang 1.10 (openshift#1764) 656156b Add unit tests for binding and broker backends in svcat ec05486 In svcat verify service instance exists on unbind (openshift#1750) e6315a4 fix indentation from openshift#1725 (openshift#1759) 62284da Publish svcat binaries during build (openshift#1725) 8f986ae also build with golang tip and allow tip to fail (openshift#1734) 127561e use pvc for etcd volume (openshift#1684) 7d155e5 Ensure only href-checker runs on docs only commit (openshift#1693) 4ea44c4 log the version and build date on server startup (openshift#1746) 0db9519 allow getting and describing plans with class/plan name combo in svcat (openshift#1743) b1da783 print schemas when describing plan in svcat (openshift#1740) 7a7fcce Add constraint for go-open-service-broker-client (openshift#1738) 3070003 Increase timeout for broker condition polling in e2e (openshift#1745) b6878f7 Avoid Setting Authentication header twice (openshift#1685) 5317111 wrap "rm -rf" with docker (openshift#1735) d7c0bf2 Allow upper case letters in Plan names (openshift#1668) 6b27ba6 Add a constraint on go-autorest (openshift#1732) b3de6ec Added validation for ServiceBinding spec ParametersFrom REVERT: b758460ba7 origin build: modify hard coded path REVERT: 871582f73a origin build: add origin tooling git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog git-subtree-split: c3e3071633b91541cf9f1000d2d5115cdd31de1b
…service-catalog/' changes from b758460ba7..c3e3071633 c3e3071633 origin build: add origin tooling 97ddbab chart changes for v0.1.9 (openshift#1776) b5168a7 Add unit tests for class, instance, plan backends in svcat (openshift#1763) 97d11cb prometheus: only return catalog specific metrics (openshift#1774) 0fb00e3 Bump dependency on go-open-service-broker-client to 0.0.4 (openshift#1775) 0a9f1e4 Reset RemovedFromBrokerCatalog when broker re-adds a removed service class (openshift#1770) 28ec5ed Bump dependency on go-open-service-broker-client to 0.0.3 (openshift#1768) ca83d18 handle binding deletion that occurs during async bind (openshift#1760) 858d467 2 of 4 fixes for golang 1.10 (openshift#1764) 656156b Add unit tests for binding and broker backends in svcat ec05486 In svcat verify service instance exists on unbind (openshift#1750) e6315a4 fix indentation from openshift#1725 (openshift#1759) 62284da Publish svcat binaries during build (openshift#1725) 8f986ae also build with golang tip and allow tip to fail (openshift#1734) 127561e use pvc for etcd volume (openshift#1684) 7d155e5 Ensure only href-checker runs on docs only commit (openshift#1693) 4ea44c4 log the version and build date on server startup (openshift#1746) 0db9519 allow getting and describing plans with class/plan name combo in svcat (openshift#1743) b1da783 print schemas when describing plan in svcat (openshift#1740) 7a7fcce Add constraint for go-open-service-broker-client (openshift#1738) 3070003 Increase timeout for broker condition polling in e2e (openshift#1745) b6878f7 Avoid Setting Authentication header twice (openshift#1685) 5317111 wrap "rm -rf" with docker (openshift#1735) d7c0bf2 Allow upper case letters in Plan names (openshift#1668) 6b27ba6 Add a constraint on go-autorest (openshift#1732) b3de6ec Added validation for ServiceBinding spec ParametersFrom REVERT: b758460ba7 origin build: modify hard coded path REVERT: 871582f73a origin build: add origin tooling git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog git-subtree-split: c3e3071633b91541cf9f1000d2d5115cdd31de1b
I've noticed that a few releases back we started automatically starting to run builds, which is awesome.
But, within the last few drops, I've noticed that those builds will start....... eventually. It seems to take at least 60-90 seconds before the build starts. And there's no indication in the UI or CLI that a build is GOING to start. It just seems to happen, but later.
Which might result in someone starting a build accidentally and then OpenShift starting its own build.
The text was updated successfully, but these errors were encountered: