Keystone plugin failed to be built with error 'service_endpoint' is too long

Bug #1491461 reported by Andrey Sledzinskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel Plugins
Fix Released
High
Fuel Plugins Bugs
Fuel for OpenStack
Fix Released
High
Dmitry Ilyin

Bug Description

https://github.com/stackforge/fuel-plugin-detach-keystone

Build of plugin failed with
2015-09-01 22:02:30 DEBUG 27627 (base) Start schema validation for /home/jenkins/workspace/build-fuel-plugins/fuel-plugin-detach-keystone/network_roles.yaml file, {'items': {'required': ['id', 'default_mapping', 'properties'], 'type': 'object', 'properties': {'properties': {'required': ['subnet', 'gateway', 'vip'], 'type': 'object', 'properties': {'subnet': {'type': 'boolean'}, 'vip': {'items': {'required': ['name'], 'type': 'object', 'properties': {'namespace': {'pattern': '^[0-9a-z_-]+$', 'type': 'string'}, 'name': {'pattern': '^[0-9a-z_-]+$', 'type': 'string', 'maxLength': 13}}}, 'type': 'array'}, 'gateway': {'type': 'boolean'}}}, 'id': {'type': 'string'}, 'default_mapping': {'type': 'string'}}}, '$schema': 'http://json-schema.org/draft-04/schema#', 'type': 'array'}
2015-09-01 22:02:30 ERROR 27627 (cli) File '/home/jenkins/workspace/build-fuel-plugins/fuel-plugin-detach-keystone/network_roles.yaml', 'service_endpoint' is too long, value path '0 -> properties -> vip -> 0 -> name'
Traceback (most recent call last):
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/cli.py", line 120, in main
    perform_action(args)
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/cli.py", line 100, in perform_action
    actions.make_builder(args.build).run()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/actions/build.py", line 64, in run
    self.check()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/actions/build.py", line 115, in check
    self._check_structure()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/actions/build.py", line 127, in _check_structure
    ValidatorManager(self.plugin_path).get_validator().validate()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/validators/validator_v3.py", line 48, in validate
    super(ValidatorV3, self).validate()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/validators/validator_v2.py", line 44, in validate
    self.check_schemas()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/validators/validator_v3.py", line 63, in check_schemas
    self.check_network_roles_schema()
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/validators/validator_v3.py", line 76, in check_network_roles_schema
    check_file_exists=False)
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/validators/base.py", line 91, in validate_file_by_schema
    self.validate_schema(data, schema, file_path)
  File "/home/jenkins/workspace/build-fuel-plugins/fpb_venv/local/lib/python2.7/site-packages/fuel_plugin_builder-2.0.5.dev-py2.7.egg/fuel_plugin_builder/validators/base.py", line 49, in validate_schema
    self._make_error_message(exc, file_path, value_path))
ValidationError: File '/home/jenkins/workspace/build-fuel-plugins/fuel-plugin-detach-keystone/network_roles.yaml', 'service_endpoint' is too long, value path '0 -> properties -> vip -> 0 -> name'
Validation failed

Changed in fuel:
assignee: nobody → Fuel Plugins Bugs (fuel-plugins-bugs)
importance: Undecided → High
milestone: none → 7.0
Changed in fuel-plugins:
assignee: nobody → Fuel Plugins Bugs (fuel-plugins-bugs)
milestone: none → 7.0
importance: Undecided → High
no longer affects: fuel
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

This is regressing merged feature content and hardcoded VIP names in manifests that have been landed for 2 months. We shouldn't introduce this limit after SCF.

Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

https://bugs.launchpad.net/fuel/+bug/1488471 < - this was introduced because of https://review.openstack.org/#/c/215270/18/deployment/puppet/osnailyfacter/lib/puppet/parser/functions/generate_vips.rb,cm

Instead of doing p_vipname[0,13], let's do p_vipname[0,8] + short hash of 5 chars for vip to make unique, idempotent interface names so that we can enable longer VIP strings.
Example: https://github.com/peterhellberg/hashids.rb

Changed in fuel:
milestone: none → 7.0
assignee: nobody → Dmitry Ilyin (idv1985)
importance: Undecided → High
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Matt, why do you need such a long vip name? it looks strange that 13 characters isn't enough for you.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/220520

Changed in fuel:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/220520
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=8feebfbb6748c047db44f14d36d9c2e5fb4599e6
Submitter: Jenkins
Branch: master

commit 8feebfbb6748c047db44f14d36d9c2e5fb4599e6
Author: Dmitry Ilyin <email address hidden>
Date: Fri Sep 4 17:06:10 2015 +0300

    Shorten long vip names with digest suffix

    * If the vip name is too long shorten it to 8
      characters and add 4 letters suffix

    Change-Id: I0377605661dd2cd06c806cf512a082daad16be1b
    Closes-Bug: 1491461

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :

Issue was fixed by revert of patch with aforementioned restriction

Changed in fuel-plugins:
status: New → Fix Released
Changed in fuel:
status: Fix Committed → Fix Released
Revision history for this message
Liubov Efremova (lefremova) wrote :

Verified on: fuel-7.0-286-2015-09-07_03-14-53.iso

tags: removed: on-verification
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.