diff --git a/etc/default_catalog.templates b/etc/default_catalog.templates index e7a3d407f6..a69b7f0653 100644 --- a/etc/default_catalog.templates +++ b/etc/default_catalog.templates @@ -6,9 +6,9 @@ catalog.RegionOne.identity.internalURL = http://localhost:$(public_port)s/v2.0 catalog.RegionOne.identity.name = Identity Service # fake compute service for now to help novaclient tests work -catalog.RegionOne.compute.publicURL = http://localhost:$(compute_port)s/v1.1/$(tenant_id)s -catalog.RegionOne.compute.adminURL = http://localhost:$(compute_port)s/v1.1/$(tenant_id)s -catalog.RegionOne.compute.internalURL = http://localhost:$(compute_port)s/v1.1/$(tenant_id)s +catalog.RegionOne.compute.publicURL = http://localhost:8774/v1.1/$(tenant_id)s +catalog.RegionOne.compute.adminURL = http://localhost:8774/v1.1/$(tenant_id)s +catalog.RegionOne.compute.internalURL = http://localhost:8774/v1.1/$(tenant_id)s catalog.RegionOne.compute.name = Compute Service catalog.RegionOne.volume.publicURL = http://localhost:8776/v1/$(tenant_id)s diff --git a/etc/keystone.conf.sample b/etc/keystone.conf.sample index 69b8f8465e..ef188acc01 100644 --- a/etc/keystone.conf.sample +++ b/etc/keystone.conf.sample @@ -22,8 +22,13 @@ # Deprecated group/name - [DEFAULT]/bind_host #admin_bind_host=0.0.0.0 -# The port which the OpenStack Compute service listens on. -# (integer value) +# (Deprecated) The port which the OpenStack Compute service +# listens on. This option was only used for string replacement +# in the templated catalog backend. Templated catalogs should +# replace the "$(compute_port)s" substitution with the static +# port of the compute service. As of Juno, this option is +# deprecated and will be removed in the L release. (integer +# value) #compute_port=8774 # The port number which the admin service listens on. (integer @@ -143,7 +148,7 @@ #allowed_rpc_exception_modules=oslo.messaging.exceptions,nova.exception,cinder.exception,exceptions # Qpid broker hostname. (string value) -#qpid_hostname=keystone +#qpid_hostname=localhost # Qpid broker port. (integer value) #qpid_port=5672 @@ -200,7 +205,7 @@ # The RabbitMQ broker address where a single node is used. # (string value) -#rabbit_host=keystone +#rabbit_host=localhost # The RabbitMQ broker port where a single node is used. # (integer value) @@ -826,7 +831,7 @@ # # URL for connecting to the LDAP server. (string value) -#url=ldap://keystone +#url=ldap://localhost # User BindDN to query the LDAP server. (string value) #user= @@ -1294,7 +1299,7 @@ # SSL certificate subject (auto generated certificate). # (string value) -#cert_subject=/C=US/ST=Unset/L=Unset/O=Unset/CN=keystone +#cert_subject=/C=US/ST=Unset/L=Unset/O=Unset/CN=localhost [stats] diff --git a/keystone/common/config.py b/keystone/common/config.py index b047e8429e..f48a3cdb4b 100644 --- a/keystone/common/config.py +++ b/keystone/common/config.py @@ -41,8 +41,13 @@ FILE_OPTIONS = { help='The IP address of the network interface for the ' 'admin service to listen on.'), cfg.IntOpt('compute_port', default=8774, - help='The port which the OpenStack Compute service ' - 'listens on.'), + help='(Deprecated) The port which the OpenStack Compute ' + 'service listens on. This option was only used for ' + 'string replacement in the templated catalog backend. ' + 'Templated catalogs should replace the ' + '"$(compute_port)s" substitution with the static port ' + 'of the compute service. As of Juno, this option is ' + 'deprecated and will be removed in the L release.'), cfg.IntOpt('admin_port', default=35357, help='The port number which the admin service listens ' 'on.'), diff --git a/keystone/tests/default_catalog.templates b/keystone/tests/default_catalog.templates index 7efe7d55a5..faf87eb5ff 100644 --- a/keystone/tests/default_catalog.templates +++ b/keystone/tests/default_catalog.templates @@ -7,8 +7,8 @@ catalog.RegionOne.identity.name = 'Identity Service' catalog.RegionOne.identity.id = 1 # fake compute service for now to help novaclient tests work -catalog.RegionOne.compute.publicURL = http://localhost:$(compute_port)s/v1.1/$(tenant_id)s -catalog.RegionOne.compute.adminURL = http://localhost:$(compute_port)s/v1.1/$(tenant_id)s -catalog.RegionOne.compute.internalURL = http://localhost:$(compute_port)s/v1.1/$(tenant_id)s +catalog.RegionOne.compute.publicURL = http://localhost:8774/v1.1/$(tenant_id)s +catalog.RegionOne.compute.adminURL = http://localhost:8774/v1.1/$(tenant_id)s +catalog.RegionOne.compute.internalURL = http://localhost:8774/v1.1/$(tenant_id)s catalog.RegionOne.compute.name = 'Compute Service' catalog.RegionOne.compute.id = 2 diff --git a/keystone/tests/test_backend_sql.py b/keystone/tests/test_backend_sql.py index d76889950e..b6a3c0c469 100644 --- a/keystone/tests/test_backend_sql.py +++ b/keystone/tests/test_backend_sql.py @@ -385,7 +385,7 @@ class SqlCatalog(SqlTests, test_backend.CatalogTests): } self.catalog_api.create_service(service['id'], service.copy()) - malformed_url = "http://192.168.1.104:$(compute_port)s/v2/$(tenant)s" + malformed_url = "http://192.168.1.104:8774/v2/$(tenant)s" endpoint = { 'id': uuid.uuid4().hex, 'region': uuid.uuid4().hex, diff --git a/keystone/tests/test_backend_templated.py b/keystone/tests/test_backend_templated.py index a3a83386e9..a11dd10083 100644 --- a/keystone/tests/test_backend_templated.py +++ b/keystone/tests/test_backend_templated.py @@ -67,7 +67,7 @@ class TestTemplatedCatalog(tests.TestCase, test_backend.CatalogTests): (self.catalog_api.driver.templates ['RegionOne']['compute']['adminURL']) = \ - 'http://localhost:$(compute_port)s/v1.1/$(tenant)s' + 'http://localhost:8774/v1.1/$(tenant)s' # the malformed one has been removed catalog_ref = self.catalog_api.get_catalog('foo', 'bar') diff --git a/tools/sample_data.sh b/tools/sample_data.sh index 620013ba05..4576dee9e1 100755 --- a/tools/sample_data.sh +++ b/tools/sample_data.sh @@ -159,9 +159,9 @@ keystone service-create --name=nova \ --description="Nova Compute Service") if [[ -z "$DISABLE_ENDPOINTS" ]]; then keystone endpoint-create --region RegionOne --service-id $NOVA_SERVICE \ - --publicurl "http://$CONTROLLER_PUBLIC_ADDRESS:\$(compute_port)s/v2/\$(tenant_id)s" \ - --adminurl "http://$CONTROLLER_ADMIN_ADDRESS:\$(compute_port)s/v2/\$(tenant_id)s" \ - --internalurl "http://$CONTROLLER_INTERNAL_ADDRESS:\$(compute_port)s/v2/\$(tenant_id)s" + --publicurl "http://$CONTROLLER_PUBLIC_ADDRESS:8774/v2/\$(tenant_id)s" \ + --adminurl "http://$CONTROLLER_ADMIN_ADDRESS:8774/v2/\$(tenant_id)s" \ + --internalurl "http://$CONTROLLER_INTERNAL_ADDRESS:8774/v2/\$(tenant_id)s" fi #