Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect summary duration during shutdown #224

Conversation

PartialVolume
Copy link
Collaborator

If the system is shutdown while nwipe is still
wiping, the duration calculation would be
incorrect. This patch fixes that problem, so for
instance if a UPS signals the system running nwipe to
shutdown, nwipe typically traps that signal and
exits in an orderly manner. The log summary
is generated showing the wipe was aborted and
the wipe duration shows a valid value i.e the
elapsed time since the start of the wipe.

Example of nwipe summary table after a shutdown is initiated mid wipe.

[2020/03/19 15:42:09] notice: Device /dev/sda excluded as per command line option -e
[2020/03/19 15:42:09] notice: Device /dev/sdb excluded as per command line option -e
[2020/03/19 15:42:09] notice: Found /dev/sdc, ATA WDC WD1600AAJS-2, 160GB, S/N=WD-WMAV2FS49552
[2020/03/19 15:42:09] notice: Device /dev/mapper/cryptswap1 excluded as per command line option -e
[2020/03/19 15:42:09] info: Automatically enumerated 1 devices.
[2020/03/19 15:42:09] notice: bios-version = E16F2IM7 V5.0E
[2020/03/19 15:42:09] notice: bios-release-date = 01/10/2012
[2020/03/19 15:42:09] notice: system-manufacturer = MEDION
[2020/03/19 15:42:09] notice: system-product-name = X681X
[2020/03/19 15:42:09] notice: system-version = To be filled by O.E.M.
[2020/03/19 15:42:09] notice: system-serial-number = To be filled by O.E.M.
[2020/03/19 15:42:09] notice: system-uuid = 03000200-0400-0500-0006-000700080009
[2020/03/19 15:42:09] notice: baseboard-manufacturer = MEDION
[2020/03/19 15:42:09] notice: baseboard-product-name = X681X
[2020/03/19 15:42:09] notice: baseboard-version = To be filled by O.E.M.
[2020/03/19 15:42:09] notice: baseboard-serial-number = To be filled by O.E.M.
[2020/03/19 15:42:09] notice: baseboard-asset-tag = To be filled by O.E.M.
[2020/03/19 15:42:09] notice: chassis-manufacturer = To Be Filled By O.E.M.
[2020/03/19 15:42:09] notice: chassis-type = Notebook
[2020/03/19 15:42:09] notice: chassis-version = To be filled by O.E.M.
[2020/03/19 15:42:09] notice: chassis-serial-number = To Be Filled By O.E.M.
[2020/03/19 15:42:09] notice: chassis-asset-tag = To Be Filled By O.E.M.
[2020/03/19 15:42:09] notice: processor-family = Core i7
[2020/03/19 15:42:09] notice: processor-manufacturer = Intel
[2020/03/19 15:42:09] notice: processor-version = Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
[2020/03/19 15:42:09] notice: processor-frequency = 800 MHz
[2020/03/19 15:42:09] notice: Opened entropy source '/dev/urandom'.
[2020/03/19 15:42:15] notice: /dev/sdc has serial number WD-WMAV2FS49552
[2020/03/19 15:42:15] notice: /dev/sdc, sect/blk/dev 512/4096/1128095744
[2020/03/19 15:42:15] notice: Invoking method 'DoD Short' on /dev/sdc
[2020/03/19 15:42:15] notice: Starting round 1 of 1 on /dev/sdc
[2020/03/19 15:42:15] notice: Starting pass 1/3, round 1/1, on /dev/sdc
[2020/03/19 15:42:47] error: Curses endwin() failed !
[2020/03/19 15:42:49] fatal: Nwipe exited with non fatal errors on device = /dev/sdc


********************************************************************************
! Device | Status | Thru-put | HH:MM:SS | Model/Serial Number
--------------------------------------------------------------------------------
!    sdc |UABORTED|   95MB/s | 00:00:34 | ATA WDC WD1600AAJ/WD-WMAV2FS49552
--------------------------------------------------------------------------------
[2020/03/19 15:42:49] Total Throughput   95MB/s, DoD Short, 1R+B+VL
********************************************************************************

Closes #21

If the system is shutdown while nwipe is still
wiping, the duration calculation would be
incorrect. This patch fixes that problem, so for
instance if a UPS signals the system running nwipe to
shutdown, nwipe typically traps that signal and
exits in an orderly manner. The log summary
is generated showing the wipe was aborted and
the wipe duration shows a valid value i.e the
elapsed time since the start of the wipe.
@PartialVolume PartialVolume merged commit a1e6e3b into martijnvanbrummelen:master Mar 19, 2020
@PartialVolume PartialVolume deleted the fix_summary_duration_during_shutdown_in_middle_of_wipe branch March 20, 2020 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsuccessful end of final blanking process is not logged in text mode
1 participant