Skip to content

find a bug about readiness_probe port type error #257

@barnettZQG

Description

@barnettZQG

error:

Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Date': 'Fri, 16 Jun 2017 04:24:27 GMT', 'Content-Length': '799', 'Content-Type': 'application/json'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"ReplicationController \"657c4cf604e335548521b060887f3cd6\" is invalid: spec.template.spec.containers[0].readinessProbe.httpGet.port: Invalid value: \"80\": must contain at least one letter or number (a-z, 0-9)","reason":"Invalid","details":{"name":"657c4cf604e335548521b060887f3cd6","kind":"ReplicationController","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: \"80\": must contain at least one letter or number (a-z, 0-9)","field":"spec.template.spec.containers[0].readinessProbe.httpGet.port"},{"reason":"FieldValueInvalid","message":"Invalid value: \"80\": must contain at least one letter or number (a-z, 0-9)","field":"spec.template.spec.containers[0].readinessProbe.httpGet.port"}]},"code":422}

code:

rc = client.get_rc(tenant_id, rc_id)
rc.spec.replicas = cur_replicas
client.put_rc(tenant_id, rc_id, rc)

bug reason:

'readiness_probe': {'_exec': None,
                                                                    'failure_threshold': 3,
                                                                    'http_get': {'host': None,
                                                                                 'http_headers': None,
                                                                                 'path': '/wp-admin/install.php',
                                                                                 'port': '80',
                                                                                 'scheme': 'HTTP'},
                                                                    'initial_delay_seconds': 1,
                                                                    'period_seconds': 3,
                                                                    'success_threshold': 1,
                                                                    'tcp_socket': None,
                                                                    'timeout_seconds': 20},

Is printed above the get rc entities, including readiness_probe port field from json python entity type is not correct.[0-9] should be converted to type int, [a-z] should be converted to character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions