Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Build status reason is Unknown after move bamboo to new server

David Udvari October 2, 2024

I want to move our bamboo server to a new server. In the new instance everything seems fine but the status reason will be 'Unknown'. 

For example this was in the old server:
#6255 was successful Custom build by 'xy' with revision 'xy'

And this is after:

#6255 was successful Unknown

 

The bamboo and bitbucket communication works perfectly. If I rerun the build it will work. Maybe the old server caching this names to a different folder?

 

 

 

 

1 answer

1 vote
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2024

Hello Udvari,

Welcome to Atlassian community.

Can you paste the screenshot of the page which you are referencing in the above example ?

Regards,

Shashank Kumar

David Udvari October 2, 2024

Hello, 

Of course.

This is a screenshot from our working prod bamboo Képernyőfotó 2024-10-03 - 8.44.27.png

 

This is the new migrated bamboo:
Képernyőfotó 2024-10-03 - 8.44.19.png

 

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2024

Hello Udvari,

This seems little off, I don't think so there is any particular file on the Bamboo server where this Info would be fetched.

Either this data is Indexed or a call is made to DB to get the data, can you try to Reindex Bamboo and see if it helps, refer Reindexing data 

Regards,

Shashank Kumar

David Udvari October 3, 2024

Hello,

Unfortunately, the reindex does not help.

 

Br,

David

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2024

Hello David,

I was able to replicate this behaviour by manually editing some data in 

buildresultsummary and buildresultsummary_customdata table.

Can you run the below 2 queries and share the results if possible, hide any confidential data if any.

1. select * from buildresultsummary where build_number=6255 and build_type='chain' and build_key='plan-key'

Replace plan-key with the affected plan key

2. 

select * from buildresultsummary_customdata where buildresultsummary_id=

Put buildresultsummary_id from query 1

Regards,

Shashank Kumar

Like Steffen Opel _Utoolity_ likes this
David Udvari October 3, 2024

Hello 

This is the query result:

select * from buildresultsummary where build_number=6255 and build_type='CHAIN' and build_key=‘DOC-AD';

 

 buildresultsummary_id | build_type |      created_date       | build_key |  plan_name   | build_number | build_state | life_cycle_state |      build_date       | build_cancelled_date |  build_completed_date  | duration | processing_duration | time_to_fix | trigger_reason | delta_state | build_agent_id | stageresult_id | restart_count |       queue_time        | marked_for_deletion | once_off | custom_build | rebuild | log_size | variable_context_baseline_id | format_version | failure_test_count | success_test_count | total_test_count | broken_test_count | existing_test_count | fixed_test_count | total_test_duration | quarantined_test_count | skipped_test_count | vcs_update_time | chain_result | continuable | fixed_in_result | mergeresult_id

-----------------------+------------+-------------------------+-----------+--------------+--------------+-------------+------------------+-----------------------+----------------------+------------------------+----------+---------------------+-------------+----------------+-------------+----------------+----------------+---------------+-------------------------+---------------------+----------+--------------+---------+----------+------------------------------+----------------+--------------------+--------------------+------------------+-------------------+---------------------+------------------+---------------------+------------------------+--------------------+-----------------+--------------+-------------+-----------------+----------------

              81437808 | CHAIN      | 2023-12-12 14:45:05.483 | DOC-AD    | Docker |         6255 | Successful  | Finished         | 2023-12-12 14:45:12.8 |                      | 2023-12-12 14:47:51.51 |   158710 |              155292 |             |                | PASSING     |                |                |             0 | 2023-12-12 14:45:05.483 | f                   | t        | f            | f       |          |                     79134747 |          70018 |                  0 |                  0 |                0 |                 0 |                   0 |                0 |                   0 |                      0 |                  0 |                 |              | f           |                 |

(1 row)

 

 

select * from buildresultsummary_customdata where buildresultsummary_id=81437808;

 buildresultsummary_id |             custom_info_key             | custom_info_value

-----------------------+-----------------------------------------+-------------------

              81437808 | ManualBuildTriggerReason.customRevision | 9b5d76412a5

              81437808 | customRevision                          | 9b5d76412a5

              81437808 | ManualBuildTriggerReason.userName       | david.udvari

              81437808 | dependenciesDisabled                    | true

              81437808 | plan.storageTag                         | plan-7471130

(5 rows)

 

I compared it with the original bamboo and it matches.

 

Br,

David

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2024

Hey David,

If you look at the result of the 1st query, the column trigger_reason is Blank, when I was replicating this issue I manually made it empty and had the same result as yours.

When you re trigger the build what is the value of this column can you please confirm and also what version of Bamboo are you using?

Regards,

Shashank Kumar

Like Steffen Opel _Utoolity_ likes this
David Udvari October 7, 2024

Hi Shashank,

You are right. If I change the trigger_reason to the original data, it's fine. This is a bamboo version 7.0.4. I don't know, if I restore this configuration to a newer version, will it work? Or do I need to update the original bamboo.

 

Br,

David

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2024

Hey David,

Bamboo 7.0.4 is end of life version since a long period of time, I don't know if this is a bug or something difficult to say.

if I understand you correctly in your old bamboo server and the DB this column ( trigger_reason ) is having value for all the builds.

When you move to new server this column is not having data, please correct me If I am wrong.

Also are you using the same DB or you copied the data from old db to new DB, probably some problem while copying the data from old to new new DB.

Regards,

Shashank Kumar

Like Steffen Opel _Utoolity_ likes this
David Udvari October 8, 2024

Hello,

I updated the original bamboo instance in a cloned environment to 8.0.11 and exported. If I load the exported zip into the new system this error appears on the log:

 

2024-10-08 17:03:53,312 INFO [10-BAM::PlanExec:pool-16-thread-3] [NonBlockingPlanExecutionServiceImpl] Object CHAIN:AUT-ADS1 has been deleted.

2024-10-08 17:03:53,312 WARN [10-BAM::PlanExec:pool-16-thread-3] [ImmutablePlanCacheServiceImpl] Attempt to load plan AARCH-IATH2 while cache is disabled

2024-10-08 17:03:53,312 ERROR [10-BAM::PlanExec:pool-16-thread-3] [ImmutablePlanCacheServiceImpl]

com.atlassian.bamboo.plan.cache.ImmutablePlanCacheServiceImpl$PlanCacheDisabledException: Plan cache is disabled

 

And the result is the same. All trigger_reason column are blank.

 

I will try to unzip the exported file and see if it exists or not. 

Do you have any other ideas?

 

Br,

David

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2024

Hello David,

Looks like the export zip is corrupted possibly it was created when this plan was doing some actions.

Let's do the below.

1. Your original Bamboo Instance is 7.0.4 which is on a old host.

2. From the same Bamboo Instance create a new export zip ( make sure when you are creating the export zip the server is paused )

3. On the new host Install the same version of Bamboo which is 7.0.4 and import the zip, at this point you'll have two Bamboo running in one on old host and one on new host.

4. Compare if the trigger reason column is populated on the Bamboo on the new host.

5. If yes then go ahead and upgrade Bamboo on the new host

6. If no, then something is wrong when the export zip is being created, we'll discuss that further. 

 

Like Steffen Opel _Utoolity_ likes this
David Udvari October 10, 2024

Hello, 

 

I paused the original bamboo instane and created an export. After I imported to the new server and it is the same trigger_reason in db are empty. 

I exported the new server and unzipped the backup and the trigger_reason is here: 
root@bamboo:/var/atlassian/application-data/bamboo/shared/exports# grep -r "buildReason" ./ | head -n 10
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:RerunBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:CodeChangedTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>
./db-export/projects.xml: <buildReason>com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason</buildReason>

 

 

But when I imported into the new server the postgres db said this: 

cat /var/log/postgresql/postgresql-14-main.log | grep buildresultsummary

2024-10-08 19:43:11.027 CEST [504533] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist at character 22

2024-10-08 19:43:11.027 CEST [504533] bamboouser@bamboo STATEMENT:  select count(*) from buildresultsummary

2024-10-08 19:43:11.029 CEST [504533] bamboouser@bamboo ERROR:  relation "buildresultsummary_customdata" does not exist at character 22

2024-10-08 19:43:11.029 CEST [504533] bamboouser@bamboo STATEMENT:  select count(*) from buildresultsummary_customdata

2024-10-08 19:43:11.030 CEST [504533] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist at character 22

2024-10-08 19:43:11.030 CEST [504533] bamboouser@bamboo STATEMENT:  select count(*) from buildresultsummary_label

2024-10-08 19:43:48.667 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:43:48.668 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:43:48.669 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:43:48.669 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:43:48.671 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary_customdata" does not exist

2024-10-08 19:43:48.671 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:43:48.672 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:43:48.672 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:43:48.673 CEST [504534] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:44:40.994 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:44:40.995 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:44:40.996 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:44:40.996 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary" does not exist

2024-10-08 19:44:40.997 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary_customdata" does not exist

2024-10-08 19:44:40.998 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:44:40.998 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:44:40.999 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 19:44:41.000 CEST [504537] bamboouser@bamboo ERROR:  relation "buildresultsummary_label" does not exist

2024-10-08 20:46:29.084 CEST [507095] postgres@postgres ERROR:  relation "buildresultsummary" does not exist at character 15

 

 

So I tried with the H2 embedded db and it's the same Unknown status. (reindexed manually). 

 

I ran this query as two systems. (select BUILDRESULTSUMMARY_ID,TRIGGER_REASON from BUILDRESULTSUMMARY). And I found that only the 'com.atlassian.bamboo.plugin.system.triggerReason:CustomRevisionBuildTriggerReason' rows are missing from the new server database

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2024

Hello David,

if the export file does not contains that value, then probably a bug for that specific version. I'll have to test this in my system and confirm.

You can try to manual clone the DB and home directory instead of Export and Import and this problem will not come. 

Regards,

Shashank kumar

 

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events