Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
initramfs-with-mca
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
initramfs-with-mca
Commits
4aa6a8b0
Commit
4aa6a8b0
authored
Mar 28, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dracut.module/: Add a debug mode in initramfs.
parent
ac49a7d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
11 deletions
+39
-11
dracut.module/90metadata-collect/collect.sh
dracut.module/90metadata-collect/collect.sh
+17
-8
dracut.module/90metadata-collect/debug-mode.conf
dracut.module/90metadata-collect/debug-mode.conf
+18
-0
dracut.module/90metadata-collect/module-setup.sh
dracut.module/90metadata-collect/module-setup.sh
+4
-3
No files found.
dracut.module/90metadata-collect/collect.sh
View file @
4aa6a8b0
...
@@ -5,16 +5,25 @@
...
@@ -5,16 +5,25 @@
#>&2 echo "$NEWROOT" # DEBUG: display the path of newroot before the pivot
#>&2 echo "$NEWROOT" # DEBUG: display the path of newroot before the pivot
#sleep 10 # DEBUG
#sleep 10 # DEBUG
DEBUG_LOG_FILE
=
/var/log/debug-mode.log
MCA_LOG_FILE
=
/var/log/metadata_collect.log
MCA_LOG_FILE
=
/var/log/metadata_collect.log
echo
"********** /sbin **********"
>>
$MCA_LOG_FILE
/sbin/fluent-bit
-e
/etc/libfluentbit_wendelin.so
-c
/etc/debug-mode.conf &
ls
-Rl
/sbin
>>
$MCA_LOG_FILE
debug_flb_pid
=
$!
echo
"********** /bin **********"
>>
$MCA_LOG_FILE
sleep
1
# wait for fluent-bit to monitor the log file (?)
#ls -Rl /bin >> $MCA_LOG_FILE
echo
"********** /etc **********"
>>
$MCA_LOG_FILE
echo
"NEWROOT =
$NEWROOT
"
&>>
$DEBUG_LOG_FILE
ls
-Rl
/etc
>>
$MCA_LOG_FILE
echo
"********** /sbin **********"
&>>
$DEBUG_LOG_FILE
echo
"********** /lib **********"
>>
$MCA_LOG_FILE
ls
-Rl
/sbin &>>
$DEBUG_LOG_FILE
#ls -Rl /lib >> $MCA_LOG_FILE
echo
"********** /bin **********"
&>>
$DEBUG_LOG_FILE
ls
-Rl
/bin &>>
$DEBUG_LOG_FILE
echo
"********** /etc **********"
&>>
$DEBUG_LOG_FILE
ls
-Rl
/etc &>>
$DEBUG_LOG_FILE
echo
"********** /lib **********"
&>>
$DEBUG_LOG_FILE
ls
-Rl
/lib &>>
$DEBUG_LOG_FILE
echo
"fluentbit_end"
&>>
$DEBUG_LOG_FILE
wait
$debug_flb_pid
#/sbin/metadata-collect-agent "$NEWROOT"
#/sbin/metadata-collect-agent "$NEWROOT"
/sbin/metadata-collect-agent
$NEWROOT
/sbin/fluent-bit /etc/libfluentbit_wendelin.so /etc/flb.conf /var/log/metadata_collect.log
/sbin/metadata-collect-agent
$NEWROOT
/sbin/fluent-bit /etc/libfluentbit_wendelin.so /etc/flb.conf /var/log/metadata_collect.log
...
...
dracut.module/90metadata-collect/debug-mode.conf
0 → 100644
View file @
4aa6a8b0
[
SERVICE
]
flush
5
[
INPUT
]
name
tail
path
/
var
/
log
/
debug
-
mode
.
log
tag
DEBUG
[
output
]
name
fluentbit_wendelin
match
*
streamtool_uri
https
://
softinst157546
.
host
.
vifib
.
net
/
erp5
/
portal_ingestion_policies
/
metadata_upload
user
zope
password
qxrfkwod
buffer_type
memory
flush_interval
60
s
disable_retry_limit
true
reference
c
-
light
-
data_05
dracut.module/90metadata-collect/module-setup.sh
View file @
4aa6a8b0
#!/bin/bash
#!/bin/bash
check
()
{
check
()
{
require_binaries
grep head
ip
ls
||
return
1
require_binaries
grep head
ip
ls
sleep
||
return
1
return
255
return
255
}
}
...
@@ -10,10 +10,11 @@ depends() {
...
@@ -10,10 +10,11 @@ depends() {
}
}
install
()
{
install
()
{
inst_multiple
head
ip
grep ls
inst_multiple
head
ip
grep ls
sleep
inst
"
$moddir
"
/metadata-collect-agent
"/sbin/metadata-collect-agent"
inst
"
$moddir
"
/metadata-collect-agent
"/sbin/metadata-collect-agent"
inst
"
$moddir
"
/fluent-bit
"/sbin/fluent-bit"
inst
"
$moddir
"
/fluent-bit
"/sbin/fluent-bit"
inst
"
$moddir
"
/flb.conf
"/etc/flb.conf"
inst
"
$moddir
"
/libfluentbit_wendelin.so
"/etc/libfluentbit_wendelin.so"
inst
"
$moddir
"
/libfluentbit_wendelin.so
"/etc/libfluentbit_wendelin.so"
inst
"
$moddir
"
/flb.conf
"/etc/flb.conf"
inst
"
$moddir
"
/debug-mode.conf
"/etc/debug-mode.conf"
inst_hook pre-pivot 10
"
$moddir
"
/collect.sh
inst_hook pre-pivot 10
"
$moddir
"
/collect.sh
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment