Skip to content

Commit

Permalink
Merge pull request #356 from openSUSE/fs/fix_validation_errors
Browse files Browse the repository at this point in the history
Fixed geekodoc validation issues
  • Loading branch information
hennevogel authored Jul 4, 2024
2 parents 371508a + dc912f9 commit c13884b
Show file tree
Hide file tree
Showing 16 changed files with 274 additions and 258 deletions.
2 changes: 1 addition & 1 deletion xml/obs_admin_components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<title>Simplified &obsa; Component Overview</title>
<mediaobject>
<imageobject>
<imagedata fileref="obs_components.png" width="800"/>
<imagedata fileref="obs_components.png" width="80%"/>
</imageobject>
</mediaobject>
</figure>
Expand Down
99 changes: 51 additions & 48 deletions xml/obs_ag_administration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
<title>Backup</title>
<para>
&obs; configuration and content needs usually a backup. The following explains
suggested strategies and places considered for a backup.
suggested strategies and places considered for a backup.
</para>

<sect2 xml:id="_backup_places">
<title>Places to consider</title>
<para>The following is pointing to the places with admin configurations or user content.
The default location places are considered here.
The default location places are considered here.
</para>
<sect3 xml:id="_backup_configuration_frontend">
<title>Frontend Configuration</title>
<itemizedlist>
<listitem>
<para>/srv/www/obs/api/config</para>
<para>/srv/www/obs/api/config</para>
</listitem>
<listitem>
<para>/srv/www/obs/api/log (optional)</para>
<para>/srv/www/obs/api/log (optional)</para>
</listitem>
</itemizedlist>
<para>The configuration is not changing usually. It is enough to backup it after config changes.
Expand All @@ -46,28 +46,28 @@
<sect3 xml:id="_backup_database_frontend">
<title>Frontend Database</title>
<para>The MySQL/MariaDB database backup can be done in different ways. Please consider the database
manual for details. One possible way is to create dumps via mysqldump tool. The backup should be
done at the same point of time as the source server. Inconsistencies can be resolved
manual for details. One possible way is to create dumps via mysqldump tool. The backup should be
done at the same point of time as the source server. Inconsistencies can be resolved
using the check_consistency tool.</para>
</sect3>
<sect3 xml:id="_backup_backend_configuration">
<title>Backend Configuration</title>
<para>The backend has a single configuration file which may got altered. This is by default
/usr/lib/obs/server/BSConfig.pm . The file is not supposed to be changed usually and
it can only be done by the system root user. A backup after a change is sufficient.
/usr/lib/obs/server/BSConfig.pm . The file is not supposed to be changed usually and
it can only be done by the system root user. A backup after a change is sufficient.
</para>
</sect3>
<sect3 xml:id="_backup_backend_content">
<title>Backend Content</title>
<para>All backend content is below /srv/obs directory. This include the sources, build results and
also all configuration changes done by the OBS admin users.
also all configuration changes done by the OBS admin users.
</para>
</sect3>
</sect2>
<sect2 xml:id="_backup_strategies">
<title>Backup strategies</title>
<para>
A backup is ideally taken only from a not running service. In real live this is
A backup is ideally taken only from a not running service. In real live this is
usually not possible, so it is important to run a backup on a production system.
</para>
<sect3 xml:id="_backup_strategy_database">
Expand All @@ -82,15 +82,15 @@
<para>The sources are supposed to be backup at the same time as the database. This
can get achieved by either having a dedicated instance for the source server
or by having a backup of the following directories.
</para>
<itemizedlist>
<listitem>
<para>/srv/obs/projects</para>
<para>/srv/obs/projects</para>
</listitem>
<listitem>
<para>/srv/obs/sources</para>
<para>/srv/obs/sources</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 xml:id="_backup_strategy_backend_binaries">
<title>Build Results</title>
Expand All @@ -112,53 +112,56 @@
<sect2 xml:id="_restore_database_inconsistencies">
<title>Check and repair database inconsistencies</title>
<para>If either database portions or sources got restored there are chances for inconsistencies.
These can be found via
<screen>&prompt.user;<command>cd /srv/www/obs/api/</command>
&prompt.user;<command>./bin/rails c</command>
&prompt.user;<command>ConsistencyCheckJob.new.perform</command>
</screen>
Single projects can be either checked with
<screen>&prompt.user;<command>cd /srv/www/obs/api/</command>
&prompt.user;<command>./bin/rake check_project project="YOUR_PROJECT"</command>
</screen>
or inconsistencies fixed via
<screen>&prompt.user;<command>cd /srv/www/obs/api/</command>
&prompt.user;<command>./bin/rake fix_project project="YOUR_PROJECT"</command>
</screen>
These can be found via
</para>
<screen>&prompt.user;<command>cd /srv/www/obs/api/</command>
&prompt.user;<command>./bin/rails c</command>
&prompt.user;<command>ConsistencyCheckJob.new.perform</command></screen>
<para>
Single projects can be either checked with
</para>
<screen>&prompt.user;<command>cd /srv/www/obs/api/</command>
&prompt.user;<command>./bin/rake check_project project="YOUR_PROJECT"</command></screen>
<para>
or inconsistencies fixed via
</para>
<screen>&prompt.user;<command>cd /srv/www/obs/api/</command>
&prompt.user;<command>./bin/rake fix_project project="YOUR_PROJECT"</command> </screen>
</sect2>
<sect2 xml:id="_restore_binaries">
<title>Binaries</title>
<para>All build results are evaluated by the scheduler. Therefore any inconsistency can be
detected by the scheduler. One way is to enforce a cold start, which means that the
scheduler would rescan all sources and binaries and trigger builds where needed.
This can be achieved by
<screen>&prompt.user;<command>rcobsscheduler stop # ensure no scheduler is running</command>
&prompt.user;<command>rm /srv/obs/run/*.state # remove all state files</command>
&prompt.user;<command>rcobsscheduler start</command>
</screen>
The scheduler state will be visible as in cold start. It may take a longer time, so it
might be more efficient to check only certain projects or architectures if needed.
This can be triggered in a running system by executing
<screen>&prompt.user;<command>obs_admin --check-project PROJECT ARCHITERCTURE</command>
</screen>
A deep check is necessary in case sources have been restored:
<screen>&prompt.user;<command>obs_admin --deep-check-project PROJECT ARCHITERCTURE</command>
</screen>
detected by the scheduler. One way is to enforce a cold start, which means that the
scheduler would rescan all sources and binaries and trigger builds where needed.
This can be achieved by
</para>
<screen>&prompt.user;<command>rcobsscheduler stop # ensure no scheduler is running</command>
&prompt.user;<command>rm /srv/obs/run/*.state # remove all state files</command>
&prompt.user;<command>rcobsscheduler start</command></screen>
<para>
The scheduler state will be visible as in cold start. It may take a longer time, so it
might be more efficient to check only certain projects or architectures if needed.
This can be triggered in a running system by executing
</para>
<screen>&prompt.user;<command>obs_admin --check-project PROJECT ARCHITERCTURE</command></screen>
<para>
A deep check is necessary in case sources have been restored:
</para>
<screen>&prompt.user;<command>obs_admin --deep-check-project PROJECT ARCHITERCTURE</command></screen>
</sect2>
</sect1>

<sect1 xml:id="_handle_data_corruption">
<title>Repair Data Corruption</title>
<para>
On-disk data might be corrupted independent of a restore. For example due to power outage, filesystem
or disk errors. A MySQL/Maria database in a cluster should repair itself in that case. Data
on disk in the backend parts can be checked and fixed using an dedicated tool. See the help
of the tool for further details or run
<screen>&prompt.user;<command>/usr/lib/obs/server/bs_check_consistency --check-all</command>
</screen>
Data can be repaired using the fix options.
On-disk data might be corrupted independent of a restore. For example due to power outage, filesystem
or disk errors. A MySQL/Maria database in a cluster should repair itself in that case. Data
on disk in the backend parts can be checked and fixed using an dedicated tool. See the help
of the tool for further details or run
</para>
<screen>&prompt.user;<command>/usr/lib/obs/server/bs_check_consistency --check-all</command></screen>
<para>
Data can be repaired using the fix options.
</para>
</sect1>

Expand Down
2 changes: 1 addition & 1 deletion xml/obs_architecture.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<title>Simplified OBS Component Overview</title>
<mediaobject>
<imageobject>
<imagedata fileref="obs_components.png" width="500"/>
<imagedata fileref="obs_components.png" width="50%"/>
</imageobject>
</mediaobject>
</figure>
Expand Down
15 changes: 8 additions & 7 deletions xml/obs_best_practice_upstream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1" xml:id="cha.obs.best-practices.upstream" os="opensuse;novell">
<title>Publishing Upstream Binaries</title>
<info/>

<para>
This chapter covers main step of using OBS to publish binaries of your
project for multiple distributions.
Expand Down Expand Up @@ -159,7 +159,7 @@
<title>openSUSE download page for package from OBS</title>
<mediaobject>
<imageobject>
<imagedata fileref="download_page_screenshot.png" width="800"/>
<imagedata fileref="download_page_screenshot.png" width="80%"/>
</imageobject>
</mediaobject>
</figure>
Expand Down Expand Up @@ -246,15 +246,16 @@
<code>object</code>
to include download code:
</para>
<screen>&lt;object type="text/html"
<screen>&lt;object type="text/html"
data="http://software.opensuse.org/download.html?project=openSUSE:Tools&amp;package=osc&amp;bcolor=004&amp;acolor=ff0&amp;fcolor=fff&amp;hcolor=0ff"
width="100%" height="100%"&gt;
&lt;param name="src"
&lt;param name="src"
value="http://software.opensuse.org/download.html?project=openSUSE:Tools&amp;package=osc&amp;bcolor=004&amp;acolor=ff0&amp;fcolor=fff&amp;hcolor=0ff" /&gt;
Your browser doesn't support objects, please continue to the
&lt;a href="http://software.opensuse.org/download.html?project=openSUSE:Tools&amp;package=osc&amp;bcolor=004&amp;acolor=ff0&amp;fcolor=fff&amp;hcolor=0ff"&gt;
download page&lt;/a&gt;
&lt;/object&gt;</screen>
&lt;/object&gt;
</screen>
<para>
If you are using PHP on your server, you can make it easier by using
following code:
Expand All @@ -263,10 +264,10 @@
&lt;?php
$url = "http://software.opensuse.org/download.html?project=openSUSE:Tools&amp;package=osc&amp;bcolor=004&amp;acolor=ff0&amp;fcolor=fff&amp;hcolor=0ff";
echo '
&lt;object type="text/html"
&lt;object type="text/html"
data="' . $url . '"
width="100%" height="100%"&gt;
&lt;param name="src"
&lt;param name="src"
value="' . $url . '" /&gt;
Your browser doesn't support objects, please continue to the
&lt;a href="' . $url . '"&gt;download page&lt;/a&gt;
Expand Down
Loading

0 comments on commit c13884b

Please sign in to comment.