Project

General

Profile

Bug #28210

Run boot.attach as a job

Added by Vladimir Vinogradenko over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
Critical
Assignee:
Vaibhav Chauhan
Category:
GUI (new)
Target version:
Seen in:
Severity:
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

`boot.attach_pool` was turned into a job as it is a long-running task. New Web UI code needs to be updated accordingly.


Related issues

Related to FreeNAS - Bug #27834: Fix the attachment of boot mirror devicesDone2018-01-162018-02-12
Related to FreeNAS - Bug #28240: Install FreeBSD GPT zfs loader instead of grubDone

History

#1 Updated by Vladimir Vinogradenko over 1 year ago

  • Related to Bug #27834: Fix the attachment of boot mirror devices added

#2 Updated by Dru Lavigne over 1 year ago

  • Target version changed from 11.1-U2 to 11.2-BETA1

#3 Updated by Vladimir Vinogradenko over 1 year ago

  • Target version changed from 11.2-BETA1 to 11.1-U2

Dru, no, it's middleware part is already merged to the stable branch and it's a tiny fix, so we should get it ready by 11.1-U2

#4 Updated by Erin Clark over 1 year ago

  • Category set to GUI (new)
  • Assignee changed from Erin Clark to Vaibhav Chauhan

#5 Updated by Vaibhav Chauhan over 1 year ago

  • Assignee changed from Vaibhav Chauhan to Vladimir Vinogradenko

so according to william, the changes for converting boot.attach to job is not merged in the master yet, can you please confirm.

also, when I was trying to use `boot.attach` to attach a 2nd drive to the boot pool I was presented with the following message,

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 150, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 904, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 872, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 502, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/boot.py", line 138, in attach
    await self.install_grub(boottype, dev)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/boot.py", line 96, in install_grub
    await run(*args, check=False)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/utils.py", line 61, in run
    proc = await asyncio.create_subprocess_exec(*args, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/subprocess.py", line 225, in create_subprocess_exec
    stderr=stderr, **kwds)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1191, in subprocess_exec
    bufsize, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/unix_events.py", line 191, in _make_subprocess_transport
    **kwargs)
  File "/usr/local/lib/python3.6/asyncio/base_subprocess.py", line 39, in __init__
    stderr=stderr, bufsize=bufsize, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/unix_events.py", line 697, in _start
    universal_newlines=False, bufsize=bufsize, **kwargs)
  File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/sbin/grub-install': '/usr/local/sbin/grub-install'

I have been told it's a legitimate bug please, confirm.

#6 Updated by William Grzybowski over 1 year ago

  • Subject changed from boot.attach_pool is a job now to boot.attach is a job now
  • Assignee changed from Vladimir Vinogradenko to Vaibhav Chauhan

I have merged it this morning.

As far the traceback, I already told you its another bug that deserves a new ticket. I dont understand what else is there to confirm?

Thank you

#7 Updated by William Grzybowski over 1 year ago

  • Related to Bug #28240: Install FreeBSD GPT zfs loader instead of grub added

#8 Updated by Dru Lavigne over 1 year ago

  • Target version changed from 11.1-U2 to 11.2-BETA1

#9 Updated by Vaibhav Chauhan over 1 year ago

14311

I was testing my change which was my adding a drive to the boot pool and making a mirror, and then removing the old drive from the boot pool making it a freenas-boot a stripe configuration. when I rebooted the VM I was shown the following message, on the console.

#10 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Vaibhav Chauhan

It seems to me that you did not wait for the freenas-boot resilver to complete. Try waiting a few more before rebooting (check zpool status freenas-boot)

#11 Updated by Vaibhav Chauhan over 1 year ago

  • Assignee changed from Vaibhav Chauhan to Erin Clark

#12 Updated by William Grzybowski over 1 year ago

  • Target version changed from 11.2-BETA1 to 11.1-U2

This absolutely needs to go to U2 because the middlewared code was already merged.

#13 Updated by Erin Clark over 1 year ago

  • Status changed from In Progress to Done
  • Assignee changed from Erin Clark to Vaibhav Chauhan

#14 Updated by Dru Lavigne over 1 year ago

  • Status changed from Done to In Progress

VB: this one will also need a PR for stable.

#15 Updated by Vaibhav Chauhan over 1 year ago

  • Status changed from In Progress to Done

following changes were cherry-picked to webui:freenas/11.1-stable

34584ec147e3dcfe3173f53dd4d7af452a8dac59
84e6ce0f23349df765a2348dec4225e90b63273e
efc7a455f0790b36c033e34c17097b57dad5672a

#16 Updated by Dru Lavigne over 1 year ago

  • Subject changed from boot.attach is a job now to boot.attach now runs as a job
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#17 Updated by Dru Lavigne over 1 year ago

  • Subject changed from boot.attach now runs as a job to Run boot.attach as a job

Also available in: Atom PDF