Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=ab8b0e0ba2…
Commit: ab8b0e0ba2fff7585a386673ff378f3cdc992063
Parent: 820f78aa19af31c25d1bcfd1d21de134026a56db
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Nov 11 14:40:39 2014 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Fri Jan 9 13:09:58 2015 -0600
fsck.gfs2: Change basic dentry checks for too long of file names
This patch adds a check to the basic dentry check such that it will reject
any dirents that have a file name more than the maximum allowed.
---
gfs2/fsck/pass2.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 1559d8e..bdcf77c 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -468,7 +468,8 @@ static int basic_dentry_checks(struct gfs2_inode *ip, struct gfs2_dirent *dent,
}
}
- if (de->de_rec_len < GFS2_DIRENT_SIZE(de->de_name_len)) {
+ if (de->de_rec_len < GFS2_DIRENT_SIZE(de->de_name_len) ||
+ de->de_name_len > GFS2_FNAMESIZE) {
log_err( _("Dir entry with bad record or name length\n"
"\tRecord length = %u\n\tName length = %u\n"),
de->de_rec_len, de->de_name_len);
@@ -476,9 +477,12 @@ static int basic_dentry_checks(struct gfs2_inode *ip, struct gfs2_dirent *dent,
log_err( _("Directory entry not fixed.\n"));
return 0;
}
+ /* Don't be tempted to do this:
fsck_blockmap_set(ip, ip->i_di.di_num.no_addr,
_("corrupt directory entry"),
gfs2_inode_invalid);
+ We can't free it because another dir may have a valid reference
+ to it. Just return 1 so we can delete the bad dirent. */
log_err( _("Bad directory entry deleted.\n"));
return 1;
}
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=575cbe08…
Commit: 575cbe08a6077ecc1512ceaecfc964378c1a11a6
Parent: 6b37cab7bc7fe41ce313d947b9c409c994c23451
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jan 14 15:56:15 2015 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jan 14 15:56:15 2015 +0100
fencing: default value for ipport was not always correct
Correction of metadata output lead to situation when default value of
ipport was not properly set e.g. if --ssh was not default, it's value
was ignored. This update, moves setting default value to proper function.
---
fence/agents/lib/fencing.py.py | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index b9a2028..c0ff034 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -1096,7 +1096,6 @@ def _update_metadata(options):
protocol = [x for x in ["snmp_version", "secure", "ssl", "web", "telnet"] if device_opt.count(x)][0]
default_value = tcp_ports[protocol]
- all_opt["ipport"]["default"] = default_value
if default_string is None:
all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default %s)" % \
(default_value)
@@ -1104,8 +1103,25 @@ def _update_metadata(options):
all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use\n" + " "*40 + default_string
def _set_default_values(options):
+ if "ipport" in options["device_opt"]:
+ if not "--ipport" in options:
+ if "default" in all_opt["ipport"]:
+ options["--ipport"] = all_opt["ipport"]["default"]
+ elif "snmp_version" in options["device_opt"]:
+ options["--ipport"] = "161"
+ elif "--ssh" in options or all_opt["secure"].get("default", "0") == "1":
+ options["--ipport"] = "22"
+ elif "--ssl" in options or all_opt["ssl"].get("default", "0") == "1":
+ options["--ipport"] = "443"
+ elif "--ssl-secure" in options or all_opt["ssl_secure"].get("default", "0") == "1":
+ options["--ipport"] = "443"
+ elif "web" in options["device_opt"]:
+ options["--ipport"] = "80"
+ elif "telnet" in options["device_opt"]:
+ options["--ipport"] = "23"
+
for opt in options["device_opt"]:
- if all_opt[opt].has_key("default"):
+ if all_opt[opt].has_key("default") and not opt == "ipport":
getopt_long = "--" + all_opt[opt]["longopt"]
if not options.has_key(getopt_long):
options[getopt_long] = all_opt[opt]["default"]
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=7acc07fb…
Commit: 7acc07fbb3d71089bb36c53746db52a7e7a202b8
Parent: 0000000000000000000000000000000000000000
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: 2015-01-07 13:52 +0000
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: 2015-01-07 13:52 +0000
annotated tag: v4.0.14 has been created
at 7acc07fbb3d71089bb36c53746db52a7e7a202b8 (tag)
tagging ea5ece5705bb8e7d6da2c3d4402833b1004f66d5 (commit)
replaces v4.0.13
v4.0.14 release
Marek 'marx' Grac (21):
[refactor] Fix issues according to pylint
[refactor] Fix issues according to pylint
[refactor] Change definition of log_expect() method
[refactor] remove unused variable
[refactor] Functionality of fence_login(...) was too broad
[refactor] function check_input(..)
[refactor] function metadata(..)
[refactor] function process_input(..)
[refactor] Function _update_metadata(..)
fence_eps, fence_amt: Fix invalid default port values
fence_emerson: New fence agent for Emerson's devices MPX and MPH2
[refactor] simplifying function metadata() + fix XML for fence_cisco_ucs
fence_emerson: Add power-wait=5seconds because device is too fast
library: Properly escape XML also in getopt mixed=".."
[refactor] Function _parse_input_cmdline(...)
[refactor] Function _get_opts_with_invalid_choices(...)
fence_zvmip: Port fence agent to fencing library
fencing: Short options can be misinterpreted
fence_zvm: Manual page is obsoleted because it is autogenerated now
fencing: Validate if short "getopt" of available options is unique
fence_mpath: Fix duplicate "getopt" which was not propagated anywhere
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=b746cdbe…
Commit: b746cdbe59db607fa08ba5aadb00196d2677c93c
Parent: 60333a24b22438ba33184aa803eb2386fca0e0ad
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jan 7 14:36:59 2015 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jan 7 14:36:59 2015 +0100
fence_zvm: Manual page is obsoleted because it is autogenerated now
---
fence/agents/zvm/fence_zvm.8 | 87 ------------------------------------------
1 files changed, 0 insertions(+), 87 deletions(-)
diff --git a/fence/agents/zvm/fence_zvm.8 b/fence/agents/zvm/fence_zvm.8
deleted file mode 100644
index 8c0d35a..0000000
--- a/fence/agents/zvm/fence_zvm.8
+++ /dev/null
@@ -1,87 +0,0 @@
-.TH fence_zvm 8
-
-.SH NAME
-fence_zvm - Power Fencing agent for GFS on System z z/VM Clusters
-
-.SH SYNOPSIS
-.B
-fence_zvm
-[\fIOPTION\fR]...
-
-.SH DESCRIPTION
-fence_zvm is a Power Fencing agent used on a GFS virtual machine in a System z z/VM cluster.
-It uses the SMAPI interface to recycle an active image.
-
-fence_zvm accepts options on the command line as well as from stdin.
-fence_node sends the options through stdin when it execs the agent.
-fence_zvm can be run by itself with command line options which is useful
-for testing.
-
-Vendor URL: http://www.sinenomine.net
-
-.SH OPTIONS
-.TP
-\fB-o --action\fP
-Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine
-.TP
-\fB--delay\fP \fIseconds\fP
-Time to delay fencing action in seconds
-.TP
-\fB-n --plug\fP \fItarget\fP
-Name of virtual machine to recycle.
-.TP
-\fB-h --help\fP
-Print out a help message describing available options, then exit.
-.TP
-\fB-a --ip\fP \fIsmapi Server\fP
-\fBName\fP of SMAPI server virtual machine. To be consistent with other fence agents this name is a little misleading: it is the name of the virtual machine not its IP address or hostname.
-.TP
-\fB--zvmsys\fP \fIz/VM System\fP
-\fBName\fP of z/VM on which the SMAPI server virtual machine resides. Optional - defaults to system on which the node is running.
-.TP
-\fB-h --help\fP
-Display usage information
-.TP
-\fI-t --timeout = < shutdown timeout >\fP
-Amount of \fIgrace\fP time to give the virtual machine to shutdown cleanly before being
-forcibly terminated. Currently, this option is ignored.
-
-.SH STDIN PARAMETERS
-.TP
-\fIagent = < param >\fP
-This option is used by fence_node(8) and is ignored by fence_zvm.
-.TP
-\fIaction = < action >\fP
-Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine
-.TP
-\fIport = < target >\fP
-Name of virtual machine to recycle.
-.TP
-\fIipaddr= < server name >\fP
-\fBName\fP of SMAPI server virtual machine. To be consistent with other fence agents thisname is a little misleading: it is the name of the virtual machine not its IP address or hostname.
-.TP
-\fItimeout = < shutdown timeout >\fP
-Amount of \fIgrace\fP time to give the virtual machine to shutdown cleanly before being
-forcibly terminated. Currently, this option is ignored.
-
-.SH SEE ALSO
-fence(8), fenced(8), fence_node(8)
-
-.SH NOTES
-To use this agent the z/VM SMAPI service needs to be configured to allow the virtual
-machine running this agent to connect to it and issue the image_recycle operation.
-This involves updating the VSMWORK1 AUTHLIST VMSYS:VSMWORK1. file. The entry should look
-something similar to this:
-
-.nf
-Column 1 Column 66 Column 131
-| | |
-V V V
-XXXXXXXX ALL IMAGE_OPERATIONS
-.fi
-
-Where XXXXXXX is the name of the virtual machine where the agent resides.
-
-In addition, the VM directory entry that defines this virtual machine requires the
-IUCV ANY statement (or IUCV <userid of SMAPI Server>). This authorizes use of IUCV
-to connect to the SMAPI server.