When upgrading your OpenShift Origin cluster, there are two primary data migrations that take place. The first occurs while still running the current version of OpenShift Origin, and the second happens after the upgrade completes.

If the pre-upgrade migration fails, the upgrade will be halted and the cluster administrator must resolve any data consistency problems before attempting the upgrade again. If the post-upgrade migration fails, the upgrade will complete and the cluster administrator should investigate the data migration issues as soon as possible. This document catalogs known data consistency problems and how to resolve them.

Duplicate Ports in Service definition

Service objects have more strict validation rules, one that does not allow duplicate Ports entries (considering Protocol and Port pair). (BZ#1563929)

Error Output
TASK [Upgrade all storage] ****************************************************************************************************************************************************************************
fatal: [test.linux.lan]: FAILED! => {
    "changed": true,
    "cmd": [
    "delta": "0:07:06.574833",
    "end": "2018-04-03 11:22:07.834827",
    "failed_when_result": true,
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2018-04-03 11:15:01.259994",


error: Service "my-service" is invalid: spec.ports[5]: Duplicate value: api.ServicePort{Name:"", Protocol:"TCP", Port:8500, TargetPort:intstr.IntOrString{Type:0, IntVal:0, StrVal:""}, NodePort:0}
summary: total=37768 errors=1 ignored=0 unchanged=37767 migrated=0
info: to rerun only failing resources, add --include=services
error: 1 resources failed to migrate

To resolve this issue:

  1. Log in to the CLI as a cluster administrator and inspect the Service objects listed in the error.

  2. Edit the .spec.ports of the objects removing duplicate ports keeping in mind that pair .spec.ports[*].name and .spec.ports[*].port must be unique.