I'm not a user, but I play one on TV :-)
I think it'd be worth writing up a short comparison of how to do
a few common tasks in various systems
(old zumastor, proposed new zumastor, zfs, netapp).
Here's a start, with just two tasks.
Probably belongs on a wiki or in a text file in our doc directory...
1. Disabling atime update on access:
Netapp:
$ vol options volname no_atime_update on
see http://ecserv1.uwaterloo.ca/netapp/man/man1/na_vol.1.html
ZFS:
$ zfs set atime=off volname
Old Zumastor:
?
Jiaying's proposal:
?
2. Scheduling snapshots:
Netapp:
snap sched [ vol_name [ weeks [ days [ hours[@list] ] ] ] ]
see http://ecserv1.uwaterloo.ca/netapp/man/man1/na_snap.1.html
ZFS:
no provision for it -- you have to put it in crontab yourself.
Rolling over old snapshots is also manual, but is built on snapshot renaming.
See e.g. http://blogs.sun.com/mmusante/entry/rolling_snapshots_made_easy
Old Zumastor:
?
Jiaying's proposal:
?
Six new commands (three kinds of get and three kinds of set) versus one
new command "redefine", which otherwise uses syntax that already exists.
Daniel
Let me point out that your proposal has one big advantage: it exists
and has a patch. I'm actually inclined to say, ok put it in, it solves
the problem, not the way I like, but then this is not a perfect world.
Still... if you suddenly were to realize that "redefine" is a better
way to go, I would like that even more.
Daniel
IMHO this is an area where we don't need to rush... let's
not put it in until we're sure we have a coherent user story.
I'd actually be happy putting this off until 0.10, and focusing
0.9 on just that one optimization.
The best approach, indeed.
Daniel
I agree. We don't want to be changing the user interface constantly.
One thing I don't like about it is how much code it adds:
bin/zumastor | 321 ++++++++++++++++++++++++++++++++++++++++++++++------
lib/zumastor/common | 135 ++++++++++++++++-----
2 files changed, 389 insertions(+), 67 deletions(-)
Shapor
Six new commands (three kinds of get and three kinds of set) versus one
new command "redefine", which otherwise uses syntax that already exists.
On Fri, May 9, 2008 at 7:49 PM, Jiaying Zhang <jiay...@google.com> wrote:
> The syntax is:
> zumastor get <vol> <property>[,...] [source] | [target <host>]
> zumastor set <vol> <property>=<value>[,...] [source] | [target <host>]
I'm not a user, but I play one on TV :-)
I think it'd be worth writing up a short comparison of how to do
a few common tasks in various systems
(old zumastor, proposed new zumastor, zfs, netapp).
Here's a start, with just two tasks.
Probably belongs on a wiki or in a text file in our doc directory...
1. Disabling atime update on access:
Netapp:
$ vol options volname no_atime_update on
see http://ecserv1.uwaterloo.ca/netapp/man/man1/na_vol.1.html
ZFS:
$ zfs set atime=off volname
Old Zumastor:
?
Jiaying's proposal:
?
2. Scheduling snapshots:
Netapp:
snap sched [ vol_name [ weeks [ days [ hours[@list] ] ] ] ]
see http://ecserv1.uwaterloo.ca/netapp/man/man1/na_snap.1.html
ZFS:
no provision for it -- you have to put it in crontab yourself.
Rolling over old snapshots is also manual, but is built on snapshot renaming.
See e.g. http://blogs.sun.com/mmusante/entry/rolling_snapshots_made_easy
Old Zumastor:
?
Jiaying's proposal:
?
Only two new command words, but six different command forms, each needing
documentation and specific code to implement.
The redefine strategy adds one new command word and no new command forms,
and can be documented generically (i.e., define|redefine ... the define form
provides default settings for any options not given explicitly in the
command while the redefine form changes only the options specified for
the command.
> to add 'zumastor redefine volume', 'zumastor redefine master', 'zumastor
> redefine target',
> 'zumastor redefine source', and 'zumastor redefine schedule'. 'zumastor
> redefine'
> actually serves the same purpose as 'zumastor set' with different syntax:
> zumastor redefine <type> --property <value>
I expect that "redefine" can be implemented with considerably less code,
and certainly requires less documentation. The easiest way for me to prove
the documentation point is to provide a patch for the man page.
Regards,
Daniel
On Saturday 10 May 2008 11:28, Jiaying Zhang wrote:
> > Six new commands (three kinds of get and three kinds of set) versus one
> > new command "redefine", which otherwise uses syntax that already exists.
>
> Only two new commands, 'zumastor get' and 'zumastor set'. I gave six examples
> on how to use the commands in my last email. With redefine approach, we need
Only two new command words, but six different command forms, each needing
documentation and specific code to implement.
The redefine strategy adds one new command word and no new command forms,
and can be documented generically (i.e., define|redefine ... the define form
provides default settings for any options not given explicitly in the
command while the redefine form changes only the options specified for
the command.
> to add 'zumastor redefine volume', 'zumastor redefine master', 'zumastor
> redefine target',
> 'zumastor redefine source', and 'zumastor redefine schedule'. 'zumastor
> redefine'
> actually serves the same purpose as 'zumastor set' with different syntax:
> zumastor redefine <type> --property <value>
I expect that "redefine" can be implemented with considerably less code,
and certainly requires less documentation. The easiest way for me to prove
the documentation point is to provide a patch for the man page.
And I completely overlooked that, thanks for mentioning it again.
> We may still want to provide 'zumastor get' command so that users have an
> easy way to obtain the current value of individual properties. I think
> 'zumastor redefine'
OK, I see where you are going, let me digest that for a bit.
> 'zumastor redefine' can follow the same syntax as 'zumastor define'. But
> one problem is that users don't reallyneed to provide all of the parameters
> to change a property.
I am not sure what you are saying. Example?
> Another problem is that some options don't take any values, like --export
> and --nocompress. We need to add a corresponding opposite option for each
> such option so that users can use 'zumastor redefine' to turn an option off.
For example, --export=no and --compress=no or --compression=none
> I am not sure how much code 'redefine' can save. As I said, many properties
> need special handling when their values are changed. E.g., when we change
> the volume mountpoint, we need to check if the '--samba' option is set and
> if so, we need to remount the snapshot samba mountpoints. zumastor
> 'redefine'and 'define' can share the option parsing code, but we do need to add
> additional 'redefine' handling code for each command.
Indeed. The alternative needs to be coded. I certainly can't take
the time to do it before I get back from Linuxtag, June 4th.
> As I said, I think both approaches have their advantages. We may want
> to ask uses' opinions to decide which way to use.
And, guess what, a user just showed up (pgquiles) and says he wants
both.
Well, let's email about it a little more, the discussion is going
somewhere. As usual, when you stick to your point, chances are there
is a very good reason for it :-)
Once again, if we go with your formulation just as you have it I am not
going to jump off a bridge, but still let's take our time. Writing the
man page changes for both approaches seems like a good thing to do.
The redefine method might need to be augmented with some kind of "get",
indeed. What are some examples where a user would need the get, as
opposed to just printing out status?
If I did augment redefine with a get-like command, I would favor doing
it by adding new features to status, rather than adding a new command.
Daniel
I'm not sure keeping both (except transitionally?) is a good idea.
Having two ways to do things makes it harder to tell our story properly
to new users.
Once we have 'set', 'define' could lose all of its options, and just
create a new node in the namespace to hang set's upon, perhaps.
OK, it seems to me that the primary driver for a "get" command is
adding a gui. Would it not be a good idea for the developer of the
gui to develop whatever interfaces are needed at the same time?
In this case it is particularly simple to develop such interfaces,
based on a well-defined filesystem layout as it is. For example,
if the gui is to be developed in python, then develop the access
methods you need in Python as well using your knowledge of the
structure of the filesystem database, which has proved to be quite
stable.
Daniel
Which would regularize the command set, but would force the user to
enter multiple commands where today a single command is sufficient.
Daniel
This is why I wanted to compare command sets for
the various popular products in the space. Could be
that other products are more regular and verbose because
people love a little bit more verbosity if it makes
things easier to learn. Especially if they often tend to
use scripts on top of the raw interface, which might well be
the case.
I am not sure what you are saying. Example?
> Another problem is that some options don't take any values, like --export
> and --nocompress. We need to add a corresponding opposite option for each
> such option so that users can use 'zumastor redefine' to turn an option off.
For example, --export=no and --compress=no or --compression=none