We have migrated to mariadb.service in mr6.2/systemd
while lest check both for some time for the backward compatibility.
Change-Id: Icea3acd0614ca0fd389c21a9e72687125fa2fefe
The old code didn't check the services if they were disabled in YML,
so far the service could be up and running without notice. Which is wrong.
We should test such situation.
Also move ngcpcfg-api to PRO only section as it should be not available on CE.
Change-Id: Ie4dc71e238fb6c73e26310b4ea215cf4fd3cfb1f
Let's clearly define what we are checking here, to prevent
the human mistakes due to possible .service, .path or .socket
Change-Id: I95bb7ae320fcca5655c800ac8c8281da13ee0a07
The current goss version doesn't work well if service has both
systemd unit and sysv script, see https://github.com/aelsabbahy/goss/pull/343
Change-Id: I8debfef430bd887a9a3fb5383fc7f20c3409cf22
Grafana will consider the database to be R/O if it's an empty file, and
refuse to start. Check for this condition.
Change-Id: Iad2f1ed4fb03370432d438c4dcd3bab342ac2588
Empty files
/etc/mysql/conf.d/my2.cnf
/etc/mysql/inc/my.mysqld1.carrier_db.cnf
/etc/mysql/inc/my.mysqld1.carrier_non_db.cnf
/etc/mysql/inc/my.client2.cnf
/etc/mysql/client.local.cnf
/etc/mysql/client.central.cnf
are created on PRO system
Change-Id: Ide21ea301ea4ef25626c7a4ce59ea606984f43da
The output of 'asterisk -rx "odbc show"' is not a 'current' state while the
cached one, also it reports unreliable data depending on which service is
starting first asterisk or db. See the ticket for the samples here.
Change-Id: I8bbdaba077c92369d6c61711a3d6382474cd2dcb
We cannot purge some packages during migration sysv->systemd on
upgrade mr6.1->mr6.2, otherwise the final command 'reboot' will
not work as expected. It commit here can be reverted in mr7.0+.
It cannot be reverted earlier, otherwise LTS upgrade will report
sysv packages availability.
Change-Id: Ib23a046a4fae50834eddc9568f2051b556f0dcaf
In short, this script/process is unneeded in systemd-based systems, so
it has been removed.
From https://dev.mysql.com/doc/mysql-linuxunix-excerpt/5.7/en/using-systemd.html :
On platforms for which systemd support for MySQL is installed,
scripts such as mysqld_safe and the System V initialization script
are unnecessary and are not installed. For example, mysqld_safe can
handle server restarts, but systemd provides the same capability,
and does so in a manner consistent with management of other services
rather than by using an application-specific program.
Because systemd has the capability of managing multiple MySQL
instances on platforms for which systemd support for MySQL is
installed, mysqld_multi and mysqld_multi.server are unnecessary and
are not installed.
Change-Id: I1536844a3ed67e153bd986d940bfeea088e978e7
In systemd, getty is not spawned unconditionally, only when the
virtual consoled is enabled, so this process is not always running.
The config of systemd can be changed to start automatically getty
processes for the consoles and leave them waiting, but IMO changing
this just to satisfy the test is not worth it.
If in the past there have been problems with not being able to log
into the system because "getty" is not enabled maybe we can reconsider
this, or perhaps find another check that really checks if the full
login is possible (although it seems complicated), because just having
getty running is not enough.
Change-Id: Ibcfee42362457129f8d96c7c14e485de26e45083
The glusterfs has ability to listen the next port in range if
the 'base-port' is occupied by some another process.
Which is happens very often on nightly tests in Debian stretch.
I have requested goss improvement to check the port from the range:
> https://github.com/aelsabbahy/goss/issues/311
So far we have to disable the check for the moment as it is unstable:
>> goss validate
> Port: tcp:24009: listening: doesn't match, expect: [true] found: [false]
While glusterfs is OK (but listening port 24010):
> root@sp1:~# netstat -anp | grep glusterfs
> tcp 0 0 0.0.0.0:24010 0.0.0.0:* LISTEN 5412/glusterfsd
>
> root@sp1:~# gluster volume status ngcp
> Status of volume: ngcp
> Gluster process TCP Port RDMA Port Online Pid
> ------------------------------------------------------------------------------
> Brick sp1:/var/lib/glusterfs/export 24010 0 Y 5412
> Brick sp2:/var/lib/glusterfs/export 24009 0 Y 5406
Change-Id: Idaf72caf4388be9b2bf5b0e98f1d4539d9438433
shellcheck before version 0.4.7 has an error:
> source/somefile: hGetContents: invalid argument (invalid byte sequence)
The issue is reported and fixed here https://github.com/koalaman/shellcheck/issues/324
Since we are in Jessie and using version 0.3.4 we need to set locale properly.
Change-Id: I92cf75dec4b40d32650375867b97dc7f4ee868a3
The line:column were not very clear and could be confused by a time, the
severity within brackets was not obvious.
Change-Id: Icef88167e3cdecc22afa16e759e7a7040b73d331
Give more information relevant when fixing the reports, state the
perlcritic tag, and the line that triggered the error.
In addition point to the Sipwise overrides that we are applying so
that it is clear when we diverge from the suggested best practices.
Change-Id: I795a29306d0f9923a402170c93cca73bbf730f14
Set a baseline of severity 4 for now that we can all agree with, which
does not impair development. Further incremental additions can be
discussed later on, and in case some are contentious, they can always
be enabled per project.
This implies the following check changes:
,---
-2 ControlStructures::ProhibitUntilBlocks [core cosmetic pbp]
-2 References::ProhibitDoubleSigils [core cosmetic pbp]
-2 ValuesAndExpressions::ProhibitEscapedCharacters [core cosmetic pbp]
-3 CodeLayout::ProhibitHardTabs [core cosmetic pbp]
+4 CodeLayout::RequireConsistentNewlines [bugs core]
+4 ControlStructures::ProhibitLabelsWithSpecialBlockNames [bugs core]
+4 InputOutput::ProhibitExplicitStdin [core maintenance pbp]
+4 Modules::RequireEndWithOne [bugs certrule core pbp]
+4 Modules::RequireExplicitPackage [bugs core]
+4 Variables::ProhibitAugmentedAssignmentInDeclaration [bugs core]
+4 Variables::ProhibitMatchVars [core pbp performance]
-4 ValuesAndExpressions::ProhibitConstantPragma [bugs core pbp]
+5 Modules::ProhibitEvilModules [bugs certrule core]
+5 Modules::RequireBarewordIncludes [core portability]
+5 Modules::RequireFilenameMatchesPackage [bugs core]
+5 Subroutines::ProhibitNestedSubs [bugs core]
+5 Subroutines::ProhibitReturnSort [bugs certrule core]
+5 Variables::ProhibitConditionalDeclarations [bugs core]
`---
Change-Id: I4986736cb075521dbe54826de8cc0b65f6d6a14d
We can't just modify the output format because perlcritic_tap
expects a specific format currently. Also some configurations
aren't supported on perlcritic as present on Debian/wheezy.
Change-Id: Ief61b9ad3109f3c3fc200b9abbc23d684ce007ea
It is a popular test, trying to keep the small Docker image size.
The image will be used to migrate all Jenkins tap-tests to Docker.
It will unblock the nodes "jenkins-slave*" migration to Debian stretch.
Later we will be able to switch jenkins on "NGCP release specific Docker images"
(using Docker tags like we do for all other Docker images)
and then upgrade Docker image to Debian stretch in trunk
(while we still be able to keep jessie for some Git repos
in case of emergency).
The script checkbashisms.pl extracted manually
because the package "devscripts" has too big dependencies list which
increases the Docker image size three times (till ~600Mb).
Also we have to use "/code/source" while normally we have just "/code"
because tap_tool_dispatcher from jenkins-debian-glue is strict to the folder name:
> if ! [ -d source ] ; then
> echo "Error: no source directory found, please run inside Jenkins." >&2
> exit 1
>fi
Change-Id: I21fb5c088db3f2966b2e374647061059dda11329
Checks:
- static configuration: passing the option "net.ifnames=0" to the
kernel during boot
- check if there are such devices ("eth*") in the system when running
Change-Id: I7d17777463d4dee7c067d1bf3e08080f91898b45
- Rename the file so that it makes more sense with the new checks.
- Improve the directory contents check to be more robust against
changes in ls output (ideally goss would support this directly
with the contains directive).
Change-Id: I8bebb929240e3147627a1ec5db246f73f948799e