glyustb / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

Can't set replication policy on 'default' class #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mogadm --trackers=10.50.30.31:7001 class modify ask default  
--replpolicy="HostsPerNetwork(mtl=2,la=1)"

What is the expected output? What do you see instead?

Expected: Set the replication policy.
What happens: Error updating class: class_not_found Class not found

What version of the product are you using? On what operating system?

2.53.

Original issue reported on code.google.com by a...@solfo.com on 19 Aug 2011 at 12:51

GoogleCodeExporter commented 9 years ago
What happens if you run:

$ mogadm class add domain default --etc

?

It's been brought up to me recently that the "default" class stuff is a little 
confusing. If you can't add the default class, that's certainly a bug. We can 
also make modify DWIM though.

Original comment by dorma...@rydia.net on 19 Aug 2011 at 2:40

GoogleCodeExporter commented 9 years ago
Adding the default class did fix it.  Not very DWIM!  :-)

Shouldn't the default class just always be created with the domain?

Original comment by a...@solfo.com on 19 Aug 2011 at 2:50

GoogleCodeExporter commented 9 years ago
Internally the "default" class is autovivified unless explicitly defined.

I've also heard that if you try to add a file and explicitly ask for the 
"default" class it'll balk at you.

We can probably special case the "class modify" routine to add the default 
class if missing, and then allow creating a file against "default" (albeit 
redundant).

I'll leave this bug open as a note to fix the behavior.

Original comment by dorma...@rydia.net on 19 Aug 2011 at 2:56

GoogleCodeExporter commented 9 years ago
Curious.   Some days ago it worked.  Today after adding the default class I 
still can't change it.

# mogadm --trackers=10.50.30.31:7001 class list | grep ca-prod-logs
 ca-prod-logs         default                   2        MultipleHosts()
# mogadm --trackers=10.50.30.31:7001 class modify ca-prod-logs default 
--replpolicy="HostsPerNetwork(mtl=2,la=1)"
# mogadm --trackers=10.50.30.31:7001 class list | grep ca-prod-logs
 ca-prod-logs         default                   2        MultipleHosts()

Original comment by a...@solfo.com on 25 Aug 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Deleting the row from the class table and then doing 'class add ...' with the 
--replpolicy parameter does on the other hand "stick"; I guess that's what I 
did some days ago.

Original comment by a...@solfo.com on 25 Aug 2011 at 3:05

GoogleCodeExporter commented 9 years ago
argh - no.  Now it goes into the database, but mogadm class list still just 
thinks it's MultipleHosts().  (Even after restarting mogilefsd)

Original comment by a...@solfo.com on 25 Aug 2011 at 6:33

GoogleCodeExporter commented 9 years ago
This is now fixed in master and will go out in 2.54.

add now works again properly under 2.50+, modify DWIM's, and delete balks at 
your idiocy.

Thanks for the report!

Original comment by dorma...@rydia.net on 29 Oct 2011 at 2:04

GoogleCodeExporter commented 9 years ago
Awesome, thank you!!

Original comment by a...@solfo.com on 31 Oct 2011 at 7:13