Use This Python Script To Find Bugs in Your Overcloud - Tool
Use This Python Script To Find Bugs in Your Overcloud - Tool
$20 for x1 ad slot with over a Million page views per month! Only x5 slots are available - for booking contact below.
@TheJoker or email at admin@onehack.us
ADVERTISEMENT
Friendly Websites
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
LogTool is a set of Python scripts that helps you investigate root causes for problems in Overcloud
nodes.
OpenStack stores and manages a bunch of log files on its Overcloud nodes and Undercloud host. Therefore, it’s not easy to use OSP log files to
investigate a problem you’re having, especially when you don’t even know what could have caused the problem.
If that’s your situation, LogTool 5 makes your life much easier! It saves you the time and work it would otherwise take to investigate the root
cause manually. Based on a fuzzy string matching algorithm, LogTool provides all the unique error and warning messages that have occurred in
the past. You can export these messages for a particular time period, such as 10 minutes ago, an hour ago, a day ago, and so on, based on
Friendly Websites in the log.
timestamp
LogTool is a set of Python scripts, and its main module, PyTool.py , is executed on the Undercloud host. Some operation modes use additional
scripts that are executed directly on Overcloud nodes, such as exporting errors and warnings from Overcloud logs.
LogTool supports Python 2 and 3, and you can change the working directory according to your needs: LogTool_Python2 or LogTool_Python3.
Operation modes
This operation mode generates a directory containing a result file for each Overcloud node. A result file is a simple text file that is compressed (
*.gz ) to reduce the time needed to download it from the Overcloud node. To convert a compressed file to a regular text file, you can use zcat or
a similar tool. Also, some versions of Vi and any recent version of Emacs both support reading compressed data. The result file is divided into
sections and contains a table of contents at the bottom.
There are two kinds of log files LogTool detects on the fly: Standard and Not Standard . In Standard , each log line has a known and defined
structure: timestamp, debug level, msg, and so on. In Not Standard , the log’s structure is unknown; it could be a third party’s logs, for example.
In the table of contents, you find a “Section name --> Line number” per section, for example:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Raw Data - extracted Errors/Warnings from standard OSP logs since: This section contains all extracted Error/Warning messages as-
is without any modifications or changes. These messages are the raw data LogTool uses for fuzzy matching analysis.
Statistics - Number of Errors/Warnings per standard OSP log since: In this section, you find the amount of Errors and Warnings per
Standard log file. This may help you understand potential components used to search for the root cause of your issue.
Statistics - Unique messages, per STANDARD OSP log file since: This section addresses unique Error and Warning messages since
a timestamp you provide. For more details about each unique Error or Warning, search for the same message in the Raw Data section.
Statistics - Unique messages per NON STANDARD log file, since any time: This section contains the unique messages in
nonstandard log files. Unfortunately, LogTool cannot handle these log files in the same manner as Standard Log files; therefore, the “since
time” you provide on extraction will be ignored, and you’ll see all of the unique Errors/Warnings messages ever created. So first, scroll
Friendly Websites
down to the table of contents at the bottom of the result file and review its sections—use the line indexes in the table of contents to jump to
the relevant sections, where numbers 3, 4, and 5 are most important.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
This mode downloads only the Overcloud logs with “Last Modified” > “given by user timestamp.” For example, if you got an error 10 minutes
ago, old log files won’t be relevant, so downloading them is unnecessary. In addition, you can’t (or shouldn’t) attach large files in some bug
reporting tools, so this mode might help with making bug reports.
8.Websites
Friendly Check Unhealthy dockers on the Overcloud
This mode is used to search for unhealthy Dockers on nodes.
Installation
LogTool is available on GitHub. Clone it to your Undercloud host with:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
git clone https://github.com/zahlabut/LogTool.git
Paramiko
This SSH module is usually installed on Undercloud by default. Use the following command to verify whether it’s installed:
Friendlyls
Websites
-a /usr/lib/python2.7/site-packages | grep paramiko
If you need to install the module, on your Undercloud, execute the following commands:
BeautifulSoup
This HTML parser module is used only in modes where log files are downloaded using HTTP. It’s used to parse the Artifacts HTML page to get
all of the links in it. To install BeautifulSoup, enter this command:
You can also use the requirements.txt file to install all the required modules by executing:
Configuration
All required parameters are set directly inside the PyTool.py script. The defaults are:
overcloud_logs_dir = ‘/var/log/containers’
overcloud_ssh_user = ‘heat-admin’
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
overcloud_ssh_key = ‘/home/stack/.ssh/id_rsa’
undercloud_logs_dir =’/var/log/containers’
source_rc_file_path=’/home/stack/’
Usage
This tool is interactive, so to start it, just enter:
cd LogTool
Friendly Websites
python PyTool.py
Troubleshooting LogTool
Two log files are created on runtime: Error.log and Runtime.log . Please add the contents of both in the description of the issue you’d like to
open.
Limitations
LogTool is hardcoded to handle files up to 500 MB.
LogTool_Python3 script
Get it at github.com/zahlabut/LogTool 5
Reply
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Friendly Websites
Suggested Topics
Last
Topic Replies
Activity
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Last
Topic Replies
Activity
LetsEncrypt CAA Bug Affected Domains and Certificates Checker Tool 0 Mar '20
Tools & Scripts cyber-security privacy checker-tool
DeimosC2 | A Golang Command And Control Framework For Post-Exploitation 0 Aug '20
Tools & Scripts golang-command control-framework deimosc2
Friendly Websites
Proxy Checker | Fast | Port Filtered | HTTPS/SOCKS Supported | High Quality Filters! 0 Aug '20
Tools & Scripts tool proxy-checker
Want to read more? Browse other topics in Tools & Scripts or view latest topics.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD