Skip to content

Commit

Permalink
add developers documentation for setup-storage
Browse files Browse the repository at this point in the history
Thanks to Kerim
  • Loading branch information
Thomas Lange committed Jul 9, 2014
1 parent 5340a2e commit 04583ed
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 0 deletions.
1 change: 1 addition & 0 deletions debian/fai-setup-storage.dirs
@@ -0,0 +1 @@
/usr/share/doc/fai-setup-storage
2 changes: 2 additions & 0 deletions doc/Makefile
Expand Up @@ -2,6 +2,7 @@

DOC = fai-guide
MISC_DOC = classes_description.txt changelog.old
DOC2DIR = $(shell pwd)/../debian/fai-setup-storage/usr/share/doc/fai-setup-storage

free: text html ps pdf
# echo "`grep -c FIXME $(DOC).txt` FIXMEs left to fix:"
Expand Down Expand Up @@ -40,6 +41,7 @@ all: free
install:
cp -dRp $(DOC)* $(DOCDIR)
cp -p $(MISC_DOC) $(DOCDIR)
cp -p setup-storage-call-graph.txt setup-storage-overview.txt $(DOC2DIR)

clean:
rm -rf images .a2x-icons fai-guide.chunked
Expand Down
141 changes: 141 additions & 0 deletions doc/setup-storage-call-graph.txt
@@ -0,0 +1,141 @@
july/2014

Call graph of subroutines


|setup-storage
|
└-------Parser.pm::in_path
|
└-------Parser.pm::run_parser
|
└-------Parser.pm::check_config
| └-------Init.pm::internal_error
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
|
└-------Parser.pm::in_path
|
└-------Volumes.pm::get_current_disks
| └-------Volume.pm::find_all_phys_devs
| └-------Exec.pm::execute_ro_command
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
| └-------Exec.pm::execute_command
| └-------Exec.pm::execute_ro_command
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
| └-------Init.pm::push_command
| └-------Init.pm::internal_error
| └-------Exec.pm::execute_ro_command
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Exec.pm::execute_ro_command
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
|
└-------Volumes.pm::get_current_lvm
| └-------Linux::LVM::get_volume_group_list
| └-------Linux::LVM::get_volume_group_information
| └-------Parser.pm::convert_unit
| └-------Init.pm::internal_error
| └-------Linux::LVM::get_logical_volume_group_information
| └-------Parser.pm::convert_unit
| └-------Init.pm::internal_error
| └-------Linux::LVM::get_physical_volume_information
|
└-------Volumes.pm::get_current_raid
| └-------Exec.pm::execute_ro_command
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
| └-------Init.pm::internal_error
|
└-------Volumes.pm::propagate_and_check_preserve
| └-------Init.pm::internal_error
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Volumes.pm::mark_preserve
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Init.pm::internal_error
|
└-------Sizes.pm::compute_partition_sizes
| └-------Init.pm::internal_error
| └-------Parser.pm::init_part_config
| └-------Init.pm::internal_error
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └------- Init.pm::loopback_dev
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └------- Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Init.pm::internal_error
| └-------Sizes.pm::do_partition_extended
| └-------Init.pm::internal_error
|
└-------Sizes.pm::compute_lv_sizes
| └-------Init.pm::internal_error
| └-------Sizes.pm::estimate_size
| └-------Init.pm::make_range
|
└-------Commands.pm::build_disk_commands
| └-------Init.pm::internal_error
| └-------Commands.pm::push_command
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Commands.pm::setup_partitions
| └-------Commands.pm::build_mkfs_commands
|
└-------Commands.pm::build_raid_commands
| └-------Commands.pm::handle_oldstyle_encrypt_device
| └-------Init.pm::internal_error
| └-------Commands.pm::push_command
|
└-------Commands.pm::build_cryptsetup_commands
| └-------Init.pm::enc_name
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Commands.pm::push_command
|
└-------Commands.pm::order_commands
| └-------Commands.pm::push_command
|
└-------Exec.pm::execute_commands
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
|
└-------Fstab.pm::generate_fstab
| └-------Exec.pm::find_boot_mnt_point
| └-------Init.pm::internal_error
| └-------Init.pm::make_device_name
| └-------Init.pm::loopback_dev
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Fstab.pm::create_fstab_line
| └-------Exec.pm::get_fstab_key
| └-------Parser.pm::in_path
| └-------Exec.pm::execute_ro_command
| └-------Exec.pm::execute_command_internal
| └-------Exec.pm::get_error
| └-------Init.pm::enc_name
| └-------Init.pm::phys_dev
| └-------Init.pm::loopback_dev
| └-------Init.pm::internal_error
72 changes: 72 additions & 0 deletions doc/setup-storage-overview.txt
@@ -0,0 +1,72 @@
july/2014

Chronological order of subroutine calls and their respective library
file (commands are listed only once, if they are called repeatedly):

setup-storage
|
|
┌---------------|
| |
| in_path
| run_parser
Parser.pm check_config
| in_path
| |
└---------------|
|
┌---------------|
| |
Volumes.pm get_current_disks
| get_current_lvm
| get_current_raid
| propagate_and_check_preserve
| |
└---------------|
|
┌---------------|
| |
Sizes.pm compute_partition_sizes
| compute_lv_sizes
| |
└---------------|
|
┌---------------|
| |
Commands.pm build_disk_commands
| buiild_raid_commands
| buiild_cryptsetup_commands
| order_commands
| |
└---------------|
|
┌---------------|
| |
Exec.pm execute_command
| |
└---------------|
|
┌---------------|
| |
Fstab.pm generate_fstab
| |
└---------------|
|
v



important data structures:

%FAI::commands : initialized in Init.pm
Holds all commands as well as their dependencies and
post-execution status. &FAI::order_commands is used on it to set
the correct order of commands and resolve the dependencies.

Commands are added to the structure by using the
FAI::push_command(COMMAND, PRE, POST) subroutine.





0 comments on commit 04583ed

Please sign in to comment.