Project

General

Profile

Bug #76027

Update init/shutdown ix* scripts

Added by Stilez y almost 3 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Can someone check if this postinit command issue replicates?

echo "START `date`">>/root/TEST.LOG; grep -q '/mnt/my_pool/private/.zshrc_custom_opts' /root/.zshrc || printf '\nsource /mnt/my_pool/private/.zshrc_custom_opts\n' >> /root/.zshrc ; echo "END">>/root/TEST.LOG

  • Works in CLI
  • When run as a postinit tast, first element succeeds ("START" written), rest doesn't (.zshrc and END not written), but there's no middlewared.log entry to suggest failure either. Is a quotation, or the || not being escaped correctly?

Related issues

Related to FreeNAS - Bug #70300: Convert ix-shutdown to etc pluginReady for Testing

History

#1 Updated by Dru Lavigne almost 3 years ago

  • Category changed from Middleware to GUI (new)
  • Assignee changed from Release Council to Anonymous

#3 Updated by Anonymous almost 3 years ago

  • Assignee changed from Anonymous to William Grzybowski

#4 Updated by Anonymous almost 3 years ago Private

As far as I can tell this command gets saved properly so the UI is doing its job as it should be, what are your thoughts, William?

#5 Updated by William Grzybowski almost 3 years ago

  • Category changed from GUI (new) to Middleware
  • Assignee changed from William Grzybowski to Waqar Ahmed
  • Target version changed from Backlog to 11.2-U3

#6 Updated by Waqar Ahmed almost 3 years ago

  • Status changed from Unscreened to In Progress

#7 Updated by Bug Clerk almost 3 years ago

  • Status changed from In Progress to Ready for Testing

#9 Updated by Dru Lavigne almost 3 years ago

  • Related to Bug #70300: Convert ix-shutdown to etc plugin added

#10 Updated by Dru Lavigne almost 3 years ago

  • Subject changed from Valid postinit task not fully executed, but also no error in log? to Update init/shutdown ix* scripts
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#14 Avatar?id=55038&size=24x24 Updated by Zackary Welch over 2 years ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Confirmed fixed in 11.2-U3.

Testing Steps:
1. Went to Tasks->Init/Shutdown and made a 'command' for each of the three 'when's that is a simple file creation (touch /mnt/testpool/test_scripts/`date '+%Y%m%d_%H-%M-%S'`_test_command_pre01)
2. Did the same thing for 'script' type, where my script was:

!/bin/sh

FILENAME=test_post
for i in `seq 0 5`
do
        touch /mnt/testpool/test_scripts/`date '+%Y%m%d-%H-%M-%s'`_"$FILENAME"_$i
done

That was for post init. Also made one for pre init and shutdown that was very similar.
3. Also made one more 'command' type that is the command in the ticket description at 'post init'.
4. Rebooted the VM to see all of the commands ran successfully. The files were created (should be 18 of them, with shutdown, pre init, and post init happening in that order, as well as the log file from the ticket's command)

#15 Updated by Dru Lavigne over 2 years ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF