From Fedora Project Wiki

(Finish the test case.)
m (adding the Server Acceptance Test Cases category)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Admon/note|Associated release criterion|This test case is associated with the {{#switch: {{{1}}} | Beta =[[Beta_Release_Criteria#{{{2|Remote_logging}}}]]| Basic =[[Basic_Release_Criteria#{{{2|Remote logging}}}]]|[[Fedora_{{FedoraVersionNumber|next}}_{{{1|Beta}}}_Release_Criteria#{{{2|Remote_logging}}}]]}} release criterion. If you are doing [[QA:Release_validation_test_plan|release validation testing]], a failure of this test case may be a breach of that release criterion. If so, please file a bug and nominate it as blocking the appropriate milestone, using the [https://qa.fedoraproject.org/blockerbugs/propose_bug blocker bug nomination page].}}
{{Template:Associated_release_criterion|Beta|remote-logging}}


{{QA/Test_Case
{{QA/Test_Case
|description=This article is '''incomplete'''. Remote logging happens when the operating system logs events and errors to a different machine (server) over the network. This test case shows whether remote logging can be set up in a Fedora Server environment using system packages available after the installation.
|description=Remote logging happens when the operating system logs events and errors to a different machine (server) over the network. This test case shows whether remote logging can be set up in a Fedora Server environment using system packages available after the installation.
|actions=
|setup=
# Run the default installation of Fedora Server on two different machines, either bare metal or virtual.  
# Run the default installation of Fedora Server on two different machines, either bare metal or virtual.  
# When the systems are installed, check the following steps (3 and 4) on both machines.
# When the systems are installed, check the following steps (3 and 4) on both machines.
# Check that <code>rsyslog</code> is installed on both machines. <pre>rpm -qi rsyslog</pre>
# Check that <code>rsyslog</code> is installed on both machines. <pre>rpm -q rsyslog</pre>
# Check that the <code>rsyslog.service</code> is up and running. <pre>systemctl status rsyslog.service</pre>
# Check that the <code>rsyslog.service</code> is up and running. <pre>systemctl status rsyslog.service</pre>
# If not, enable the service and start it. <pre>systemctl enable rsyslog.service</pre><pre>systemctl start rsyslog.service</pre>
# If not, enable the service and start it. <pre>systemctl enable --now rsyslog.service</pre>
# On the server, edit the <code>/etc/rsyslog.conf</code> file. <pre>vi /etc/rsyslog.conf</pre>
# On the server, edit the <code>/etc/rsyslog.conf</code> file. <pre>vi /etc/rsyslog.conf</pre>
# In the file, uncomment the following lines: <pre>module(load="imudp")</pre><pre>input(type="imudp" port="514")</pre>
# In the file, uncomment the following lines: <pre>module(load="imudp")</pre><pre>input(type="imudp" port="514")</pre>
Line 15: Line 15:
# On the server, display the <code>/var/log/messages</code> so that it continues in the console. <pre>tail -f /var/log/messages</pre>
# On the server, display the <code>/var/log/messages</code> so that it continues in the console. <pre>tail -f /var/log/messages</pre>
# On the client, edit the <code>/etc/rsyslog.conf</code> file. <pre>vi /etc/rsyslog.conf</pre>
# On the client, edit the <code>/etc/rsyslog.conf</code> file. <pre>vi /etc/rsyslog.conf</pre>
# In the file, make sure, you have the following lines uncommented with proper settings included, such as <pre>action(type="omfwd"</pre><pre>Target=192.168.122.201 Port="514" Protocol="udp")</pre>
# In the file, make sure, you have the following lines uncommented with proper settings included, such as <pre>action(type="omfwd"</pre><pre>Target=192.168.122.201 Port="514" Protocol="udp")</pre> where <code>192.168.122.201</code> in an example IP address (replace with the actual address of your server).
# On the client, restart the <code>rsyslog.service</code>. <pre>systemctl restart rsyslog.service</pre>
# On the client, restart the <code>rsyslog.service</code>. <pre>systemctl restart rsyslog.service</pre>
|actions=
# On the client, run the following command to log a testing message. <pre>logger user.warn This is a testing machine from the client.</pre>
# On the client, run the following command to log a testing message. <pre>logger user.warn This is a testing machine from the client.</pre>
# On the server, check that the message appears at the end of the <code>/var/log/messages</code> file.
# On the server, check that the message appears at the end of the <code>/var/log/messages</code> file.
Line 25: Line 26:
# After you edit the configuration files, the service must be restarted without any errors.
# After you edit the configuration files, the service must be restarted without any errors.
# The client sends log messages to the server which displays them in the <code>/var/log/messages</code>.
# The client sends log messages to the server which displays them in the <code>/var/log/messages</code>.
|optional=Optionally provide hints for exploratory testing.
|optional=
You can also try sending log messages via the '''tcp''' protocol. In that case.
You can also try sending log messages via the '''tcp''' protocol. In that case:
# The server's <code>/etc/rsyslog.conf</code> should have different lines uncommented, i.e. <pre>module(load="imtcp")</pre><pre>input(type="imtcp" port="514")</pre>
# The server's <code>/etc/rsyslog.conf</code> should have different lines uncommented, i.e. <pre>module(load="imtcp")</pre><pre>input(type="imtcp" port="514")</pre> Restart the service again.
# The server's firewall needs to have a '''tcp port 514''' opened. <pre>firewall-cmd --permanent --add-port=514/tcp</pre>
# The server's firewall needs to have a '''tcp port 514''' opened. <pre>firewall-cmd --permanent --add-port=514/tcp</pre><pre>firewall-cmd --reload</pre>
# The client's configuration has the '''Protocol''' property set to '''tcp'''.
# The client's configuration in <code>/etc/rsyslog.conf</code> has the '''Protocol''' property set to '''tcp'''. Restart the service again.
}}
}}
[[Category:Server Acceptance Test Cases]]

Latest revision as of 21:35, 8 February 2022

Note.png
Associated release criterion
This test case is associated with the Fedora_40_Beta_Release_Criteria#remote-logging release criterion. If you are doing release validation testing, a failure of this test case may be a breach of that release criterion. If so, please file a bug and nominate it as blocking the appropriate milestone, using the blocker bug nomination page.


Description

Remote logging happens when the operating system logs events and errors to a different machine (server) over the network. This test case shows whether remote logging can be set up in a Fedora Server environment using system packages available after the installation.

Setup

  1. Run the default installation of Fedora Server on two different machines, either bare metal or virtual.
  2. When the systems are installed, check the following steps (3 and 4) on both machines.
  3. Check that rsyslog is installed on both machines.
    rpm -q rsyslog
  4. Check that the rsyslog.service is up and running.
    systemctl status rsyslog.service
  5. If not, enable the service and start it.
    systemctl enable --now rsyslog.service
  6. On the server, edit the /etc/rsyslog.conf file.
    vi /etc/rsyslog.conf
  7. In the file, uncomment the following lines:
    module(load="imudp")
    input(type="imudp" port="514")
  8. On the server, open the UDP port 514 for incoming traffic.
    firewall-cmd --permanent --add-port=514/udp
    firewall-cmd --reload
  9. On the server, restart the rsyslog.service.
    systemctl restart rsyslog.service
  10. On the server, display the /var/log/messages so that it continues in the console.
    tail -f /var/log/messages
  11. On the client, edit the /etc/rsyslog.conf file.
    vi /etc/rsyslog.conf
  12. In the file, make sure, you have the following lines uncommented with proper settings included, such as
    action(type="omfwd"
    Target=192.168.122.201 Port="514" Protocol="udp")
    where 192.168.122.201 in an example IP address (replace with the actual address of your server).
  13. On the client, restart the rsyslog.service.
    systemctl restart rsyslog.service

How to test

  1. On the client, run the following command to log a testing message.
    logger user.warn This is a testing machine from the client.
  2. On the server, check that the message appears at the end of the /var/log/messages file.

Expected Results

The test should be considered successful, if the following is true.

  1. The rsyslog service is installed.
  2. If rsyslog.service is not running by default, it can be started without any errors.
  3. After you edit the configuration files, the service must be restarted without any errors.
  4. The client sends log messages to the server which displays them in the /var/log/messages.

Optional

You can also try sending log messages via the tcp protocol. In that case:

  1. The server's /etc/rsyslog.conf should have different lines uncommented, i.e.
    module(load="imtcp")
    input(type="imtcp" port="514")
    Restart the service again.
  2. The server's firewall needs to have a tcp port 514 opened.
    firewall-cmd --permanent --add-port=514/tcp
    firewall-cmd --reload
  3. The client's configuration in /etc/rsyslog.conf has the Protocol property set to tcp. Restart the service again.