Sean Fagan | 1 Sep 23:39 2014

Re: [FreeNAS-devel] [freenas/freenas] 2cf2441: Allow to create a new BE based on a given name

On Sep 1, 2014, at 2:32 PM, William Grzybowski <william88@...> wrote:

>> That was the purpose of the “Rename” button I thought you were going to add to the Boot Environment
management screen?
> 
> And until then, assuming one knows that feature exists, you will have
> something totally unpredictable in your boot?
> See, this is an implementation detail, why should this be exposed to
> the user? Whats the benefit?

It's what grub-mkconfig does, via /usr/local/etc/grub.d/10_ktrueos

There is no reason why we have to use that to generate the grub.cfg file.
beadm does:

# check if system has a grub.cfg file and update it
__update_grub() {
  if [ -e /boot/grub/grub.cfg ]
  then
    if grub-mkconfig -o /boot/grub/grub.cfg 1> /dev/null 2> /dev/null
    then
      echo "GRUB configuration updated successfully"
    else
      echo "WARNING: Failed to update GRUB configuration"
    fi
  fi
}

That was added by Xin, we could change it to do pretty much anything
we want.  It's just a matter of typing, as Jordan says.
(Continue reading)

Sean Fagan | 1 Sep 23:28 2014

Re: [FreeNAS-devel] [freenas/freenas] 2cf2441: Allow to create a new BE based on a given name

On Sep 1, 2014, at 2:23 PM, William Grzybowski <william88@...> wrote:

> That reminds me, are there plans to rename the BE names?
> FreeNAS-${BIGNUMBER} doesn't tell the user much. I guess we want to
> show the user a bit more than that in the UI.

The sequence number/string is the only thing guaranteed to be there, and unique.
Given that creating the environment is automated at that point, I'm not sure
what else can be done.

That said, there are a couple of options:

1:  The BE can be renamed.
2:  There could be a mapping between the BE name and a comment, note,
nickname, whatever; I'm presuming that soley in the GUI and database.
3:  When creating a clone via the GUI, the name can be anything acceptable
for zfs.

Sean.
Jordan Hubbard | 1 Sep 23:27 2014

Re: [FreeNAS-devel] [freenas/freenas] 2cf2441: Allow to create a new BE based on a given name


On Sep 1, 2014, at 2:23 PM, William Grzybowski <william88@...> wrote:

> That reminds me, are there plans to rename the BE names?
> FreeNAS-${BIGNUMBER} doesn't tell the user much. I guess we want to
> show the user a bit more than that in the UI.

That was the purpose of the “Rename” button I thought you were going to add to the Boot Environment
management screen?

- Jordan
Jordan Hubbard | 1 Sep 21:29 2014

Re: [FreeNAS-devel] [freenas/freenas] 2cf2441: Allow to create a new BE based on a given name


On Sep 1, 2014, at 12:15 PM, William Grzybowski <william88@...> wrote:

> It accepts both, a clone or a snapshot but in this particular case I
> am only using clones.

OK, that seems correct - I must have misread the diff from my phone. :)

Thanks,

- Jordan
dev | 1 Sep 20:55 2014

[freenas/freenas] a92c985: base64 encode keytabs and save them to the database

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit a92c985106b4fd701808ac5a00b08e47f911fa5d
Author: John Hixson <john@...>
Date:   Mon Sep 1 11:54:58 2014 -0700

    base64 encode keytabs and save them to the database

    - This allows keytabs to persist across upgrades
---
 gui/directoryservice/admin.py                      |  15 ++
 gui/directoryservice/forms.py                      |  40 ++--
 ...3_auto__add_field_kerberoskeytab_keytab_name.py | 224 ++++++++++++++++++++
 .../migrations/0024_set_keytab_name.py             | 222 ++++++++++++++++++++
 ..._auto__add_unique_kerberoskeytab_keytab_name.py | 222 ++++++++++++++++++++
 .../migrations/0026_migrate_keytabs.py             | 229 +++++++++++++++++++++
 gui/directoryservice/models.py                     |   6 +
 src/freenas/etc/ix.rc.d/ix-kerberos                |   7 +-
 8 files changed, 949 insertions(+), 16 deletions(-)

diff --git a/gui/directoryservice/admin.py b/gui/directoryservice/admin.py
index 62e1961..af387aa 100644
--- a/gui/directoryservice/admin.py
+++ b/gui/directoryservice/admin.py
 <at>  <at>  -102,6 +102,21  <at>  <at>  class KerberosKeytabFAdmin(BaseFreeAdmin):

     resource_mixin = KerberosKeytabResourceMixin

(Continue reading)

dev | 1 Sep 20:09 2014

[freenas/freenas] 04dadaf: Add missing BE add form

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit 04dadaf82ef4707f57105c55a6295fc41e61a85c
Author: William Grzybowski <wg@...>
Date:   Mon Sep 1 15:09:06 2014 -0300

    Add missing BE add form
---
 gui/system/views.py                   | 1 +
 gui/templates/system/bootenv_add.html | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/gui/system/views.py b/gui/system/views.py
index 3b0f0f2..26d94de 100644
--- a/gui/system/views.py
+++ b/gui/system/views.py
 <at>  <at>  -192,6 +192,7  <at>  <at>  def bootenv_add(request, source):
         form = forms.BootEnvAddForm(source=source)
     return render(request, 'system/bootenv_add.html', {
         'form': form,
+        'source': source,
     })

 
diff --git a/gui/templates/system/bootenv_add.html b/gui/templates/system/bootenv_add.html
new file mode 100644
index 0000000..27faeb5
--- /dev/null
(Continue reading)

dev | 1 Sep 19:52 2014

[freenas/freenas] 54b71d2: Hook up create button/form to actually do something

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit 54b71d2bc228626e09b05e8aa8c479defe97094c
Author: William Grzybowski <wg@...>
Date:   Mon Sep 1 14:52:41 2014 -0300

    Hook up create button/form to actually do something
---
 gui/system/forms.py | 8 +++++++-
 gui/system/views.py | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gui/system/forms.py b/gui/system/forms.py
index 95a1229..effbd14 100644
--- a/gui/system/forms.py
+++ b/gui/system/forms.py
 <at>  <at>  -52,6 +52,7  <at>  <at>  from django.utils.translation import ugettext_lazy as _
 from django.utils.translation import ugettext as __

 from dojango import forms
+from freenasOS import Update
 from freenasUI import choices
 from freenasUI.account.models import bsdGroups, bsdUsers
 from freenasUI.common import humanize_size
 <at>  <at>  -154,7 +155,12  <at>  <at>  class BootEnvAddForm(Form):
         super(BootEnvAddForm, self).__init__(*args, **kwargs)

     def save(self, *args, **kwargs):
(Continue reading)

dev | 1 Sep 19:48 2014

[freenas/freenas] 2cf2441: Allow to create a new BE based on a given name

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit 2cf2441c60c5fa7418a6a0aca03ea938ba8626c3
Author: William Grzybowski <wg@...>
Date:   Mon Sep 1 14:48:25 2014 -0300

    Allow to create a new BE based on a given name
---
 src/freenas-pkgtools/lib/Update.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/freenas-pkgtools/lib/Update.py b/src/freenas-pkgtools/lib/Update.py
index 0f649de..76b53fc 100644
--- a/src/freenas-pkgtools/lib/Update.py
+++ b/src/freenas-pkgtools/lib/Update.py
 <at>  <at>  -77,11 +77,14  <at>  <at>  def ListClones():
     return rv

 
-def CreateClone(name, snap_grub = True):
+def CreateClone(name, snap_grub=True, bename=None):
     # Create a boot environment from the current
     # root, using the given name.  Returns False
     # if it could not create it
-    args = ["create", name]
+    if bename:
+        args = ["create", "-e", bename, name]
+    else:
(Continue reading)

dev | 1 Sep 19:32 2014

[freenas/freenas] 2cd1344: Add buttons actions to the boot datagrid

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit 2cd1344c62ee1f75320a571c99df4ad97da997ae
Author: William Grzybowski <wg@...>
Date:   Mon Sep 1 14:32:17 2014 -0300

    Add buttons actions to the boot datagrid
---
 gui/system/urls.py  |  1 +
 gui/system/views.py | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/gui/system/urls.py b/gui/system/urls.py
index d51dfee..b645c03 100644
--- a/gui/system/urls.py
+++ b/gui/system/urls.py
 <at>  <at>  -70,6 +70,7  <at>  <at>  urlpatterns = patterns('freenasUI.system.views',
     url(r'^bootenv/add/(?P<source>[^/]+)/$', 'bootenv_add', name='system_bootenv_add'),
     url(r'^bootenv/datagrid/$', 'bootenv_datagrid', name='system_bootenv_datagrid'),
     url(r'^bootenv/datagrid/structure/$', 'bootenv_datagrid_structure', name='system_bootenv_datagrid_structure'),
+    url(r'^bootenv/datagrid/actions/$', 'bootenv_datagrid_actions', name='system_bootenv_datagrid_actions'),
     url(r'^config/restore/$', 'config_restore', name='system_configrestore'),
     url(r'^config/save/$', 'config_save', name='system_configsave'),
     url(r'^config/upload/$', 'config_upload', name='system_configupload'),
diff --git a/gui/system/views.py b/gui/system/views.py
index 88058dc..acc39b6 100644
--- a/gui/system/views.py
+++ b/gui/system/views.py
(Continue reading)

dev | 1 Sep 19:22 2014

[freenas/freenas] 9ff55f8: Stubs for Boot Env add, until datagrid is sorted out

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit 9ff55f89ab36a002e80eb5bbada063f327f229bd
Author: William Grzybowski <wg@...>
Date:   Mon Sep 1 14:22:02 2014 -0300

    Stubs for Boot Env add, until datagrid is sorted out
---
 gui/api/resources.py |  7 +++++++
 gui/system/forms.py  | 15 +++++++++++++++
 gui/system/urls.py   |  1 +
 gui/system/views.py  | 16 ++++++++++++++++
 4 files changed, 39 insertions(+)

diff --git a/gui/api/resources.py b/gui/api/resources.py
index df6994f..646d23c 100644
--- a/gui/api/resources.py
+++ b/gui/api/resources.py
 <at>  <at>  -2371,3 +2371,10  <at>  <at>  class BootEnvResource(DojoResource):
             len(results)
         )
         return response
+
+    def dehydrate(self, bundle):
+        if self.is_webclient(bundle.request):
+            bundle.data['_add_url'] = reverse('system_bootenv_add', kwargs={
+                'source': bundle.obj.name,
+            })
(Continue reading)

dev | 1 Sep 19:22 2014

[freenas/freenas] cd62f08: Use OrderedDict to preserve order of the columns in the datagrid

branch: master
Repository: freenas/freenas
Pushed by: git
Pushed to: branch master
commit cd62f08b6f8e1f9e0b945ca999b606c21fe14edc
Author: William Grzybowski <wg@...>
Date:   Mon Sep 1 13:49:17 2014 -0300

    Use OrderedDict to preserve order of the columns in the datagrid
---
 gui/system/views.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gui/system/views.py b/gui/system/views.py
index 13d1655..43351eb 100644
--- a/gui/system/views.py
+++ b/gui/system/views.py
 <at>  <at>  -24,7 +24,7  <at>  <at> 
 # POSSIBILITY OF SUCH DAMAGE.
 #
 #####################################################################
-
+from collections import OrderedDict
 import cPickle as pickle
 import json
 import logging
 <at>  <at>  -134,11 +134,11  <at>  <at>  def bootenv_datagrid(request):

 
 def bootenv_datagrid_structure(request):
(Continue reading)


Gmane