summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
...
* In hast_proto_recv_data() check that the size of the data to betrociny2011-04-101-2/+5
| | | | | | | received does not exceed the buffer size. Approved by: pjd (mentor) MFC after: 1 week
* Fix a typo in comments.trociny2011-04-101-1/+1
| | | | | Approved by: pjd (mentor) MFC after: 3 days
* hastd(8) maintains a map of dirty extents, not hastctl(8). Fix this.trociny2011-04-101-2/+2
| | | | | Approved by: pjd (mentor) MFC after: 3 days
* Correct 'list scan' description in the examples. The previous descriptiongjb2011-04-061-1/+1
| | | | | | | | | was incorrect - 'list scan' does not actually do a scan, but instead lists the results of the background 'scan' cache. Submitted by: Fabian Keil (freebsd-listen of fabiankeil de) (via email) Discussed with: bschmidt MFC after: 3 days
* * Add the readline(3) API to libedit. The libedit versions ofobrien2011-04-052-3/+4
| | | | | | | | | | | | | | | | {readline,history}.h are in /usr/include/edit so as to not conflict with the GNU libreadline versions. To use the libedit readline(3) one should add "-I/usr/include/edit" to their Makefile (spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree). * Enable its use in the BSD licensed utilities that support readline(3). * To make it easier to sync libedit development with NetBSD, histedit.h is moved into libedit's directory as history shows shown we keep merging it into that location. Obtained from: NetBSD Sponsored by: Juniper Networks
* Increase default timeout from 5 seconds to 20 seconds. 5 seconds is definitelypjd2011-04-022-3/+3
| | | | | | | to short under heavy load and I was experiencing those timeouts in my recent tests. MFC after: 1 week
* Handle ENOBUFS on send(2) by retrying for a while and logging the problem.pjd2011-04-021-0/+22
| | | | MFC after: 1 week
* When we are operating on blocking socket and get EAGAIN on send(2) or recv(2)pjd2011-04-021-4/+35
| | | | | | | | this means that request timed out. Translate the meaningless EAGAIN to ETIMEDOUT to give administrator a hint that he might need to increase timeout in configuration file. MFC after: 1 month
* Declare directions for sockets between primary and secondary.pjd2011-04-022-0/+12
| | | | | | | In HAST we use two sockets - one for only sending the data and one for only receiving the data. MFC after: 1 month
* Allow to disable sends or receives on a socket using shutdown(2) bypjd2011-04-021-0/+22
| | | | | | | interpreting NULL 'data' argument passed to proto_common_send() or proto_common_recv() as a will to do so. MFC after: 1 month
* Handle the problem described in r220264 by using GEOM GATE queue of unlimitedpjd2011-04-021-1/+1
| | | | | | length. This should fix deadlocks reported by HAST users. MFC after: 1 week
* Because ggatel(8) operates on local GEOM providers, use unlimited queue size inpjd2011-04-022-18/+4
| | | | | | GEOM GATE to fix the issue described in r220264. This also means that we no longer need -q option, remove it. Don't bother to leaving it as a no-op, as ggatel(8) is just an example utility.
* Add mapsize to the header just before sending the packet.pjd2011-03-251-1/+1
| | | | | | | | | Before it could change later and we were sending invalid mapsize. Some time ago I added optimization where when nodes are connected for the first time and there were no writes to them yet, there is no initial full synchronization. This bug prevented it from working. MFC after: 1 week
* Use timeout from configuration file not only when sending and receiving,pjd2011-03-251-1/+1
| | | | | | but also when establishing connection. MFC after: 1 week
* Use role2str() when setting process title.pjd2011-03-252-2/+2
| | | | MFC after: 1 week
* MFgraid/head:mav2011-03-244-0/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new RAID GEOM class, that is going to replace ataraid(4) in supporting various BIOS-based software RAIDs. Unlike ataraid(4) this implementation does not depend on legacy ata(4) subsystem and can be used with any disk drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4) with `options ATA_CAM`). To make code more readable and extensible, this implementation follows modular design, including core part and two sets of modules, implementing support for different metadata formats and RAID levels. Support for such popular metadata formats is now implemented: Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage. Such RAID levels are now supported: RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. For any all of these RAID levels and metadata formats this class supports full cycle of volume operations: reading, writing, creation, deletion, disk removal and insertion, rebuilding, dirty shutdown detection and resynchronization, bad sector recovery, faulty disks tracking, hot-spare disks. For Intel and Promise formats there is support multiple volumes per disk set. Look graid(8) manual page for additional details. Co-authored by: imp Sponsored by: Cisco Systems, Inc. and iXsystems, Inc.
* MFgraid/head r217014:mav2011-03-242-42/+161
| | | | | | | | Make `geom XXX list` and `geom XXX status` outputs more consistent: Add -a options to print all geoms, not only ones with providers. Add -g option for `status` to report geom's names, not provider's. Make `status` by default report provider's status (if present), not geom's. Make `status` report consumer's statuses, not only "synchronized" field.
* It's possible to unmount multiple items at once, make it clear.ru2011-03-242-2/+2
|
* Fix SYNOPSIS.glebius2011-03-231-1/+1
|
* Don't create socketpair for connection forwarding between parent and secondary.pjd2011-03-232-20/+28
| | | | | | Secondary doesn't need to connect anywhere. MFC after: 1 week
* Add support for displaying newfs flags for SU+J and TRIM.jmallett2011-03-231-1/+5
|
* Add my copyright.pjd2011-03-222-0/+2
| | | | MFC after: 1 week
* Forgot to commit this as part of r219873.pjd2011-03-221-1/+1
| | | | MFC after: 1 week
* After synchronization is complete we should make primary counters betrociny2011-03-221-3/+3
| | | | | | | | | | | | | equal to secondary counters: primary_localcnt = secondary_remotecnt primary_remotecnt = secondary_localcnt Previously it was done wrong and split-brain was observed after primary had synchronized up-to-date data from secondary. Approved by: pjd (mentor) MFC after: 1 week
* For requests that are sent only to remote component use thetrociny2011-03-221-2/+7
| | | | | | error from remote. Approved by: pjd (mentor) MFC after: 1 week
* The proto API is a general purpose API, so don't use 'hast' in structures orpjd2011-03-227-118/+120
| | | | | | function names. It can now be used outside of HAST. MFC after: 1 week
* White space cleanups.pjd2011-03-227-18/+18
| | | | MFC after: 1 week
* When dropping privileges prefer capsicum over chroot+setgid+setuid.pjd2011-03-215-6/+19
| | | | | | | | | We can use capsicum for secondary worker processes and hastctl. When working as primary we drop privileges using chroot+setgid+setuid still as we need to send ioctl(2)s to ggate device, for which capsicum doesn't allow (yet). X-MFC after: capsicum is merged to stable/8
* Initialize localcnt on first write. This fixes assertion when we createpjd2011-03-211-2/+6
| | | | | | | resource, set role to primary, do no writes, then sent it to secondary and accept connection from primary. MFC after: 1 week
* Fix typo.pjd2011-03-211-1/+1
| | | | MFC after: 1 week
* Before handling any events on descriptors check signals so we can updatepjd2011-03-211-28/+43
| | | | | | | | | | | | | | our info about worker processes if any of them was terminated in the meantime. This fixes the problem with 'hastctl status' running from a hook called on split-brain: 1. Secondary calls a hooks and terminates. 2. Hook asks for resource status via 'hastctl status'. 3. The main hastd handles the status request by sending it to the secondary worker who is already dead, but because signals weren't checked yet he doesn't know that and we get EPIPE. MFC after: 1 week
* Bump date from previous commit.gjb2011-03-211-1/+1
|
* Remove stale comment. Yes, it is valid to set role back to init.pjd2011-03-211-1/+1
| | | | MFC after: 1 week
* Increase debug level of "Checking hooks." message.pjd2011-03-211-1/+1
| | | | MFC after: 1 week
* Be pedantic and free nvout before exiting.pjd2011-03-211-0/+1
| | | | MFC after: 1 week
* Detect situation where resource internal identifier differs.pjd2011-03-211-0/+13
| | | | | | | This means that both nodes have separately managed resources that don't have the same data. MFC after: 1 week
* Forgot to commit this as a part of r219818.pjd2011-03-211-1/+4
| | | | MFC after: 1 week
* In hast.conf we define the other node's address in 'remote' variable.pjd2011-03-2114-36/+124
| | | | | | | | | | | | | | | | | | This way we know how to connect to secondary node when we are primary. The same variable is used by the secondary node - it only accepts connections from the address stored in 'remote' variable. In cluster configurations it is common that each node has its individual IP address and there is one addtional shared IP address which is assigned to primary node. It seems it is possible that if the shared IP address is from the same network as the individual IP address it might be choosen by the kernel as a source address for connection with the secondary node. Such connection will be rejected by secondary, as it doesn't come from primary node individual IP. Add 'source' variable that allows to specify source IP address we want to bind to before connecting to the secondary node. MFC after: 1 week
* Log when we start hooks checking and when we execute a hook.pjd2011-03-211-0/+4
| | | | MFC after: 1 week
* Use snprlcat() instead of two strlcat(3)s.pjd2011-03-211-2/+3
| | | | MFC after: 1 week
* Add snprlcat() and vsnprlcat() - the functions I'm always missing.pjd2011-03-212-0/+27
| | | | | | | They work as a combination of snprintf(3) and strlcat(3) - the caller can append a string build based on the given format. MFC after: 1 week
* When creating connection on behalf of primary worker, set pjdlog prefixpjd2011-03-211-0/+4
| | | | | | | to resource name and role, so that any logs related to that can be identified properly. MFC after: 1 week
* If there is any traffic on one of out descriptors, we were not checking forpjd2011-03-211-2/+14
| | | | | | | long running hooks. Fix it by not using select(2) timeout to decide if we want to check hooks or not. MFC after: 1 week
* Use 'list scan' in favor of 'scan', as 'scan' has a different purpose.gjb2011-03-201-1/+1
| | | | | Pointed out by: bschmidt MFC after: 1 day
* Use resolvconf(8) to update /etc/resolv.conf.ume2011-03-181-25/+46
| | | | | If you don't want to use resolvconf(8) to update /etc/resolv.conf, you can put resolvconf_enable="NO" into /etc/dhclient-enter-hooks.
* Add resolvconf(8) which manages resolv.conf.ume2011-03-182-0/+38
|
* For secondary, set 2 * HAST_KEEPALIVE seconds timeout for incomingtrociny2011-03-173-9/+8
| | | | | | | | | | connection so the worker will exit if it does not receive packets from the primary during this interval. Reported by: Christian Vogt <Christian.Vogt@haw-hamburg.de> Tested by: Christian Vogt <Christian.Vogt@haw-hamburg.de> Approved by: pjd (mentor) MFC after: 1 week
* Remove #include needed for debugging.pjd2011-03-151-1/+0
| | | | MFC after: 1 week
* In command line options allow size to be specified using k/M/G/Ttrociny2011-03-132-25/+9
| | | | | | | suffixes. Approved by: pjd (mentor) MFC after: 1 week
* Fix grammar.ae2011-03-121-2/+2
| | | | | Pointed out: Ben Kaduk MFC after: 2 weeks
OpenPOWER on IntegriCloud