When deploying a stream the following error is displayed on the Spring Cloud Dataflow dashboard
Release with the name [<STREAM-NAME>] already exists and it is not deleted.
Status of the stream is stored in the skipper_status table. To resolved the issue we need to update the following fields:
Spring Cloud Dataflow
The following steps update's the skipper_status table. Note that you will need admin role.to execute the steps.
1. Connect to the backend skipper database
2. Identify the latest status id of the stream. Execute the sql below.
select
REL.id as RELEASE_id,
REL.name as RELEASE_name,
REL.package_metadata_id as REL_package_meta_id,
META.id as META_id,
FILE.id as FILE_id,
REL.version as RELESE_version,
STATUS.id as STATUS_id,
STATUS.STATUS_code as STATUS_status_code
From skipper_release REL
Left outer join skipper_info INFO on REL.info_id=INFO.id
Left outer join skipper_status STATUS on INFO.status_id=STATUS.id
Left outer join skipper_package_metadata META on REL.package_metadata_id=META.id
Left outer join skipper_package_file FILE on META.packagefile_id=FILE.id
Where
REL.id in (
select m_id from (select name, max(id) m_id from skipper_release group by name order by name) as c_release)
and REL.name in ('<STREAM-NAME>');
where:
STREAM-NAME - name of the stream
Sample:
mysql> select
-> REL.id as RELEASE_id,
-> REL.name as RELEASE_name,
-> REL.package_metadata_id as REL_package_meta_id,
-> META.id as META_id,
-> FILE.id as FILE_id,
-> REL.version as RELESE_version,
-> STATUS.id as STATUS_id,
-> STATUS.STATUS_code as STATUS_status_code
-> From skipper_release REL
-> Left outer join skipper_info INFO on REL.info_id=INFO.id
-> Left outer join skipper_status STATUS on INFO.status_id=STATUS.id
-> Left outer join skipper_package_metadata META on REL.package_metadata_id=META.id
-> Left outer join skipper_package_file FILE on META.packagefile_id=FILE.id
-> Where
-> REL.id in (
-> select m_id from (select name, max(id) m_id from skipper_release group by name order by name) as c_release)
-> and REL.name in ('mystream1');
+------------+--------------+---------------------+---------+---------+----------------+-----------+--------------------+
| RELEASE_id | RELEASE_name | REL_package_meta_id | META_id | FILE_id | RELESE_version | STATUS_id | STATUS_status_code |
+------------+--------------+---------------------+---------+---------+----------------+-----------+--------------------+
| 350 | mystream1 | 348 | 348 | 349 | 4 | 355 | DEPLOYED |
+------------+--------------+---------------------+---------+---------+----------------+-----------+--------------------+
1 row in set (0.00 sec)
Note: the value of STATUS_id
3. View the skipper_status fields for the id
SELECT * FROM SKIPPER_STATUS WHERE ID = <STATUS_id> \G;
Sample:
mysql> SELECT * FROM SKIPPER_STATUS WHERE ID=355 \G;
*************************** 1. row ***************************
id: 355
platform_status: [{"deploymentId":"mystream1.log-v2","instances":{},"state":"unknown"},{"deploymentId":"mystream1.http-v2","instances":{},"state":"unknown"}]
status_code: DEPLOYED
1 row in set (0.00 sec)
4. Update the skipper_status fields with the following values then commit
update SKIPPER_STATUS set platform_status = NULL, status_code=;DELETED’ where id=[STATUS_id];
Sample:
mysql> update SKIPPER_STATUS set platform_status=NULL,status_code='DELETED' where id=355
mysql> commit;
5. Try deploying the stream again. If the problem persists, please open a Broadcom Support request.