Promote a content view to a lifecycle environment end up with an error

Hello everyone

hammer console or WebGUI end up with the same error

Environment with id 1-4 could not be found.

So, if I want to promote from Library to the next lifecycle environment
that is "Development" or remove a version or whatever action will fail with
the error above. I used foreman console to remove the task and the lock
and I reimport (reindex) but no success.

I have 2 environment (environment list)

environment list

---|-----------

ID | NAME

---|-----------

1 | production

13 | MYENV

---|-----------

I have 4 lifecycle-environment

lifecycle-environment list

---|----------------|---------------

ID | NAME | PRIOR

---|----------------|---------------

2 | Developpement | Library

1 | Library |

3 | Pre-Production | Developpement

4 | Production | Pre-Production

---|----------------|---------------

and 5 content-view

content-view list

----------------|---------------------------|---------------------------|-----------|---------------------|--------------------------------------------

CONTENT VIEW ID | NAME | LABEL |
COMPOSITE | LAST PUBLISHED | REPOSITORY IDS

----------------|---------------------------|---------------------------|-----------|---------------------|--------------------------------------------

2 | CentOS 6 | CentOS_6 |
        > 2017/12/20 14:59:42 | 21, 167, 25, 32, 27, 35, 31, 36, 257

3 | CentOS 7 | CentOS_7 |
        > 2017/12/20 13:15:41 | 22, 168, 26, 28, 30, 34, 33, 256, 427

1 | Default Organization View | Default_Organization_View |
        > 2017/11/28 14:04:57 |

5 | RHEL 6 | RHEL_6 |
        > 2017/12/21 19:18:56 | 17, 1, 9, 21, 23, 167, 32, 27, 31, 3, 257

4 | RHEL 7 | RHEL_7 |
        > 2017/12/21 19:18:23 | 2, 16, 13, 10, 22, 24, 168, 28, 30, 256, 18

----------------|---------------------------|---------------------------|-----------|---------------------|--------------------------------------------

Is there a way to fix this ... it happened when the server was on a hi load
and I cancel the promote of a content view.

Thanks

I found a way to get out of this problem … maybe not a nice one but it worked

First, everything start with a content view promotion or publishing that stop at 95% or that I had to cancel. I looked at the table cp_environment in candlepin database and I saw that my environment was missing so I add a new record in the table.

Here ID is ‘1-4’ and name is ‘Library/RHEL_7’ … the other fields are the same has what was in another record.

1-4 | 2018-01-03 14:57:10.497-05 | 2018-01-03 14:57:10.497-05 | | Library/RHEL_7 | 8a9a203c6002f181016002f1ecf70001

After adding the record. I can publish a new version of my “content view”