Skip to content

Commit

Permalink
chore(release): merge release 22.04.1 into 22.04.x (#349)
Browse files Browse the repository at this point in the history
* enh(broker/mysql_connection): unix socket is different on Debian or on centos7

REFS: MON-13926

* Mon 13562 sonar atoi 22.04.x.new (#290)

* Mon 13562 sonar atoi (#277)

* enh(chore): update readme.md

* enh(sonar) : replace atoi/strtol/strtoull by abseil SimpleAtoi

* chore(readme) : update readme.md in tests

* enh(sonar): replace atoi/strtoull bu SimpleAtoi abseil

Co-authored-by: David Boucher <dboucher@centreon.com>

* chore(readme) : update readme

* cleanup(broker/mysql_result): false is better than 0 in this context

Co-authored-by: David Boucher <dboucher@centreon.com>

* enh(ccc): new grpc client

At the moment, we can execute:

ccc -p 31001   # to see what the server is
ccc -p 31001 -l  # to see the available methods

REFS: MON-13947

* fix(engine): when display_name is empty, it should be replaced by description or hostname

REFS: MON-13968

* enh(tests): database credentials configurable from resource.robot (#284) (#291)

* enh(tests): database credentials configurable from resource.robot

* enh(tests): remove console.log

* rror: no keyword Kill Broker found, almost works

* enh(tests): database credentials configurable from db_variables.robot

* fix(tests) : replace DBNAME_STORAGE by correct DBNAME

* fix(tests): remove personnal passwords and add str

* fix(tests): remove bad str in front of variables from .robot

* enh(tests): seems to work. Neet to change my credentials

* enh(tests): default passwords in db-variables.robot

* fix(engine): checkable::name() conflicted with host::name()

* Mon 13901 cbd multiargs 22.04.x (#293)

* enh(broker) : cbd with multiargs, robot test to do. Debug is unused

* robot tests still don't work

* enh(cbd) : robot tests for this ticket and update doc

* fix(tests): find log in timeout can read the first line

* fix(tests): 4 robot tests pass

* fix(tests): correct clang-format

* fix(cbd): main with better comments

* Mon 13562 sonar unsigned bitwise operator (#294) (#295)

* enh(sonar): avoid unsigned bitwise operator

* enh(gitignore): ignore database credentials in tests folder

* enh(tests): untrack db_variables.robot

* fix(tests): fix bad commit on Find in log with timeout

* fix(tests): restore db_variables.robot

* fix(tests): remove gitignore in tests folder

* enh(sonar): ignore postgresql in bam folder (#296) (#298)

A security issue easily fixable.

REFS: MON-13562

* enh(sonar): change reserved name to a non reserved one (#297) (#301)

* enh(sonar): change reserved name to a non reserved one

* enh(sonar): change exp to expr

* fix(tests): bad call on lambda

* fix(sonar): good lambda call on this file

* fix(broker/bam): downtimes on kpi can be more than one

* enh(tests/bam): test on bam and ignored downtimes on kpi implemented
* chore(doc): CHANGELOG updated
* doc(tests): README updated

REFS: MON-14091

* fix(broker): rebuild/remove graphs has come back

REFS: MON-14092

* enh(ccc): ccc is functional

* enh(tests/ccc): new tests added
* fix(ccc): info are output on stderr
* enh(ccc): help input messages added
* enh(ccc): help on functions works
* cleanup(ccc): comments added

REFS: MON-14191

* MON-14166 fix bbdo compression nego (#316)

REFS:MON-14166

* Mon 13562 sonar atoi external command (#302) (#318)

#REFS: MON-13562
-replace atoi/strtoul by abseil::SimpleAtoi
-robot tests : BEATOI11, BEATOI12, BEATOI13, BEATOI21, BEATOI22, BEATOI23
-unit tests : SSHOptions in connectors/ssh/tests/options.cc

* fix(broker/engine): grpc api can be changed throught configuration. Otherwise it is fixed to localhost (#321)

REFS: MON-13904

* fix(broker/bam): detection of downtime end was bad (#319)

* fix(tests/bam): sometimes broker is too long to stop
* fix(tests/summary): new options -f and -s
* fix(conanfile): openssl updated

REFS: MON-14091

* fix(engine): bad rebase fixed here

* enh(sonar) : replace new by make_shared or make_unique (#322) (#326)

#REFS : MON-14198

enh(sonar) : replace new by make_shared or make_unique when it's already a smart pointer

* fix(robot): fix robot BEATOI tests 22.04 (#325)

* fix(robot): fix robot BEATOI tests

* enh(robot) : tag atoi

* Mon 14198 sonar dynamic allocations (#327) (#328)

#REFS: MON-14198
-replace str::dup by string or sabsl::stringview to avoid new and delete
-remove unused code in broker.cc
-fix clear broker logs so robot memory doesn't crash

* fix(broker/rebuild): error in sql query

REFS: MON-14092

* fix(broker/rebuild): creation date of rrd file too late

REFS: MON-14092

* fix(ci): update dockerfile centos7 for python38 (#337)

* fix(ci/debian): set shell to centreon-engine user (#334)

REFS: MON-14363

* fix(ci): issue with conan fixed

* fix(ci/scripts): conan bad path

* enh(engine/anomalydetection): Enable recheck for anomaly-detection services

REFS: MON-14158

* fix(ci/tests): dateutil missing for robot

* fix(ci): correct syntax

Co-authored-by: David Boucher <dboucher@centreon.com>
Co-authored-by: denliA <91119589+denliA@users.noreply.github.com>
Co-authored-by: jean-christophe81 <98889244+jean-christophe81@users.noreply.github.com>
Co-authored-by: rem31 <73845199+rem31@users.noreply.github.com>
Co-authored-by: Luiz Costa <me@luizgustavo.pro.br>
  • Loading branch information
6 people committed Aug 31, 2022
1 parent 843ef10 commit 5dabf06
Show file tree
Hide file tree
Showing 208 changed files with 7,011 additions and 3,871 deletions.
47 changes: 38 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,46 @@

## 22.04.1

### ccc

First version of ccc. Here is a client that can connect to broker or engine
through the gRPC server. Its goal is then to execute available methods on
these interfaces. At the moment, it checks the connection, tells if it was
established on engine or broker and is also able to list available methods.

### Broker

#### Enhancements

*grpc*

The gRPC api only listens by default on localhost. This is customizable with
the configuration file.

#### Fixes

*rrd*

Rebuilding/removing graphs is reenabled through database and a broker reload.

*main*

-s option works and can return errors if bad value entered

*stream gRPC*
*GRPC stream*

A gRPC stream connector did not stop correctly on cbd stop.
* Doesn't coredump if connection fails on start process.
* The gRPC stream connector did not stop correctly on cbd stop.

*BAM*

On BAM misconfiguration, cbd could crash. This is fixed now. That was due to
an issue in mysql code with promises handling.

In a BA configured to ignore its kpi downtimes, if a kpi represented by a
service has two overlapping downtimes applied. When the first one is cancelled,
it is as if all the downtimes are removed. This is fixed with this new version.

*Debian*

Default configuration files were not installed on a Debian fresh install.
Expand All @@ -29,13 +52,8 @@ tags are well removed now.

Columns notes, notes\_url and action\_url are resized.

*Debian*

Default configuration files were not installed on a Debian fresh install.

*GRPC stream*

Don't coredump if connection fail on process start
*Compression*
In the bbdo negotiation, compression was never activated

#### Enhancements

Expand All @@ -60,8 +78,19 @@ Packaging did not follow Debian good practices.

### Engine

#### Bugfixes

*resources*

The display\_name of resources could be emptied in several case of reload.

#### Enhancements

*grpc*

The gRPC api only listens by default on localhost. This is customizable with
the configuration file.

*comments*

They are sent only once to broker.
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ add_subdirectory(broker)
add_subdirectory(clib)
add_subdirectory(engine)
add_subdirectory(connectors)
add_subdirectory(ccc)

add_custom_target(test-broker
COMMAND tests/ut_broker
Expand Down
236 changes: 118 additions & 118 deletions bbdo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,161 +1,161 @@
##
## Copyright 2021 Centreon
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## For more information : contact@centreon.com
##
# #
# # Copyright 2021 Centreon
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable law or agreed to in writing, software
# # distributed under the License is distributed on an "AS IS" BASIS,
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# # See the License for the specific language governing permissions and
# # limitations under the License.
# #
# # For more information : contact@centreon.com
# #

set(protobuf_files
rebuild_message
remove_graph_message
service
host
severity
tag
)
rebuild_message
remove_graph_message
service
host
severity
tag
)

foreach(name IN LISTS protobuf_files)
set(proto_file "${name}.proto")
set(full_proto_file "${CMAKE_SOURCE_DIR}/bbdo/${name}.proto")
add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc" "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h"
DEPENDS ${full_proto_file}
COMMENT "Generating interface files of the bbdo file ${proto_file}"
COMMAND ${Protobuf_PROTOC_EXECUTABLE}
ARGS --cpp_out=${CMAKE_SOURCE_DIR}/bbdo --proto_path=${CMAKE_SOURCE_DIR}/bbdo ${proto_file}
VERBATIM
)
set(proto_file "${name}.proto")
set(full_proto_file "${CMAKE_SOURCE_DIR}/bbdo/${name}.proto")
add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc" "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h"
DEPENDS ${full_proto_file}
COMMENT "Generating interface files of the bbdo file ${proto_file}"
COMMAND ${Protobuf_PROTOC_EXECUTABLE}
ARGS --cpp_out=${CMAKE_SOURCE_DIR}/bbdo --proto_path=${CMAKE_SOURCE_DIR}/bbdo ${proto_file}
VERBATIM
)

add_custom_target("target_${name}" DEPENDS "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc" "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h")
add_custom_target("target_${name}" DEPENDS "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc" "${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h")
endforeach()

add_library(
pb_service_lib STATIC
service.pb.cc
service.pb.h
)
add_dependencies(pb_service_lib target_service)
pb_service_lib STATIC
service.pb.cc
service.pb.h
)
add_dependencies(pb_service_lib target_service pb_tag_lib)
set_target_properties(pb_service_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(
pb_host_lib STATIC
host.pb.cc
host.pb.h
)
pb_host_lib STATIC
host.pb.cc
host.pb.h
)
add_dependencies(pb_host_lib target_host)
set_target_properties(pb_host_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(
pb_severity_lib STATIC
severity.pb.cc
severity.pb.h
)
pb_severity_lib STATIC
severity.pb.cc
severity.pb.h
)
add_dependencies(pb_severity_lib target_host)
set_target_properties(pb_severity_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(
pb_tag_lib STATIC
tag.pb.cc
tag.pb.h
)
pb_tag_lib STATIC
tag.pb.cc
tag.pb.h
)
add_dependencies(pb_tag_lib target_host)
set_target_properties(pb_tag_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

macro(get_protobuf_files name)
set_source_files_properties("${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc" PROPERTIES GENERATED TRUE)
set_source_files_properties("${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h" PROPERTIES GENERATED TRUE)
set(proto_${name}
"${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc"
"${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h")
"${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.cc"
"${CMAKE_SOURCE_DIR}/bbdo/${name}.pb.h")
endmacro()

macro(get_protobuf_accessor name)
set(proto_file "${name}.proto")
set(full_proto_file "${CMAKE_SOURCE_DIR}/bbdo/${name}.proto")
add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/bbdo/${name}_accessor.hh"
DEPENDS ${full_proto_file}
COMMENT "Generating accessor to protobuf message ${proto_file}"
COMMAND python3
ARGS ${full_proto_file}
VERBATIM
)
set(proto_file "${name}.proto")
set(full_proto_file "${CMAKE_SOURCE_DIR}/bbdo/${name}.proto")
add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/bbdo/${name}_accessor.hh"
DEPENDS ${full_proto_file}
COMMENT "Generating accessor to protobuf message ${proto_file}"
COMMAND python3
ARGS ${full_proto_file}
VERBATIM
)
endmacro()

include_directories("${CMAKE_SOURCE_DIR}/broker/core/inc")

add_library(
bbdo_bbdo STATIC
"bbdo/ack.cc"
"bbdo/version_response.cc"
"bbdo/stop.cc"
"bbdo/ack.hh"
"bbdo/version_response.hh"
"bbdo/stop.hh"
)
bbdo_bbdo STATIC
"bbdo/ack.cc"
"bbdo/version_response.cc"
"bbdo/stop.cc"
"bbdo/ack.hh"
"bbdo/version_response.hh"
"bbdo/stop.hh"
)
set_target_properties(bbdo_bbdo PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_precompile_headers(bbdo_bbdo PRIVATE precomp_inc/precomp.hpp)

add_library(
bbdo_storage STATIC
"storage/index_mapping.cc"
"storage/metric_mapping.cc"
"storage/metric.cc"
"storage/rebuild.cc"
"storage/remove_graph.cc"
"storage/status.cc"
"storage/metric.hh"
"storage/rebuild.hh"
"storage/remove_graph.hh"
"storage/status.hh"
)
bbdo_storage STATIC
"storage/index_mapping.cc"
"storage/metric_mapping.cc"
"storage/metric.cc"
"storage/rebuild.cc"
"storage/remove_graph.cc"
"storage/status.cc"
"storage/metric.hh"
"storage/rebuild.hh"
"storage/remove_graph.hh"
"storage/status.hh"
)
set_target_properties(bbdo_storage PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_precompile_headers(bbdo_storage PRIVATE precomp_inc/precomp.hpp)
target_precompile_headers(bbdo_storage REUSE_FROM bbdo_bbdo)
add_dependencies(bbdo_storage table_max_size)
add_library(
bbdo_bam STATIC
"bam/ba_duration_event.cc"
"bam/dimension_ba_bv_relation_event.hh"
"bam/dimension_kpi_event.cc"
"bam/dimension_timeperiod.hh"
"bam/kpi_status.cc"
"bam/ba_duration_event.hh"
"bam/dimension_ba_event.cc"
"bam/dimension_kpi_event.hh"
"bam/dimension_truncate_table_signal.cc"
"bam/kpi_status.hh"
"bam/ba_event.cc"
"bam/dimension_ba_event.hh"
"bam/dimension_timeperiod.cc"
"bam/dimension_truncate_table_signal.hh"
"bam/rebuild.cc"
"bam/ba_event.hh"
"bam/dimension_ba_timeperiod_relation.cc"
"bam/dimension_timeperiod_exception.cc"
"bam/inherited_downtime.cc"
"bam/rebuild.hh"
"bam/ba_status.cc"
"bam/dimension_ba_timeperiod_relation.hh"
"bam/dimension_timeperiod_exception.hh"
"bam/inherited_downtime.hh"
"bam/ba_status.hh"
"bam/dimension_bv_event.cc"
"bam/dimension_timeperiod_exclusion.cc"
"bam/kpi_event.cc"
"bam/dimension_ba_bv_relation_event.cc"
"bam/dimension_bv_event.hh"
"bam/dimension_timeperiod_exclusion.hh"
"bam/kpi_event.hh"
)
bbdo_bam STATIC
"bam/ba_duration_event.cc"
"bam/dimension_ba_bv_relation_event.hh"
"bam/dimension_kpi_event.cc"
"bam/dimension_timeperiod.hh"
"bam/kpi_status.cc"
"bam/ba_duration_event.hh"
"bam/dimension_ba_event.cc"
"bam/dimension_kpi_event.hh"
"bam/dimension_truncate_table_signal.cc"
"bam/kpi_status.hh"
"bam/ba_event.cc"
"bam/dimension_ba_event.hh"
"bam/dimension_timeperiod.cc"
"bam/dimension_truncate_table_signal.hh"
"bam/rebuild.cc"
"bam/ba_event.hh"
"bam/dimension_ba_timeperiod_relation.cc"
"bam/dimension_timeperiod_exception.cc"
"bam/inherited_downtime.cc"
"bam/rebuild.hh"
"bam/ba_status.cc"
"bam/dimension_ba_timeperiod_relation.hh"
"bam/dimension_timeperiod_exception.hh"
"bam/inherited_downtime.hh"
"bam/ba_status.hh"
"bam/dimension_bv_event.cc"
"bam/dimension_timeperiod_exclusion.cc"
"bam/kpi_event.cc"
"bam/dimension_ba_bv_relation_event.cc"
"bam/dimension_bv_event.hh"
"bam/dimension_timeperiod_exclusion.hh"
"bam/kpi_event.hh"
)
set_target_properties(bbdo_bam PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_precompile_headers(bbdo_bam PRIVATE precomp_inc/precomp.hpp)
target_precompile_headers(bbdo_bam REUSE_FROM bbdo_bbdo)
add_dependencies(bbdo_bam table_max_size)
2 changes: 1 addition & 1 deletion bbdo/events.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ enum data_element {
de_version_response = 1,
de_ack = 2,
de_stop = 3,
de_rebuild_rrd_graphs = 4,
de_rebuild_graphs = 4,
de_remove_graphs = 5,
};
}
Expand Down
Loading

0 comments on commit 5dabf06

Please sign in to comment.