-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
sudo issue #72
Comments
Interesting. Do I understand correctly that the wrong ip in the first case - IP of image? Can you show
|
BTW, (this is not solution of your problem, just FYI). If you use ZFS-based system and prepare image as original for the newly created jail, you may be interested to use zfs_snapsrc params in jcreate / jconstruct-tui. , because, in contrast to jimport (with full copyinf of data) this operation is momentary: for example lets nginxsrc jail become to origin for any other new jail:
Now all what you want - create template of new jail for jcreate with follow dynamic variable:
So, sample jcreate.conf ( e.g: /tmp/test1.jconf ):
Use jcreate to create new jail via ZFS clone:
PS: if you use alternative workdir, some path need for correct. The best way to get template for jcreate - use cbsd jconstruct-tui, enter zfs_snapsrc params and answer 'no' on "Do you want to create jail immediately?" question - you get jconf sample for jcreate command. PS2: keep in mind that the original snapshot can not be removed if there is created on the basis of its container. |
Hey, Ok, i can confirm now, that this IP is original IP it had before exporting. I'm hitting this issue again today. Would it be possible to remove IP on the fly while exporting? With some additional export param perhaps? I understand that sometimes keeping the same IP is required. Or hmm, on import when newip was passed it should force it? Those ZFS features are really cool, didn't knew about them, thank You, but above problem remains, because my current use case involves .img files which are transported thru CDN. |
Looks like it was logical error, sets of newip must be on this place: https://github.com/olevole/cbsd/blob/master/jailctl/jimport#L152 Can you test this? Just get last modification from jimport and apply it:
|
For now, it seems it works fine. But i'm hitting another issue, hehe. How can i change jail hostname while importing from image? Like, i'm using some generic images (with nginx or php setup), and it seems the only way to do that now is to jimport + jrename (old=jail1 new=jail1_tmp + new hostname) + jrename (old=jail1_tmp new=jail1 - no way to change hostname without changing name, as it seems). Btw. i think by default it should change jail FQDN to newJailName.current_host_hostname. |
Agreed with you about FQDN. I've rename newjname and newip to more relevant new_jname and new_ip4_addr and add optional new_host_hostname params: Most likely this is what you need within this issue ;)
|
feedback timeout, close |
Hi,
Please take a look at this cli output. First cbsd jimport was issued using "sudo" and "sh". Second one, was issued directly. Please compare IP addr which was set and selected (by cbsd) interfaces. The one with sudo is invalid here.
Can i get any hint on how can i make this work?
(cbsd-10.3.0)
The text was updated successfully, but these errors were encountered: