Re: bsnmpd always died on HDD detach

2012-09-16 Thread Andrey V. Elsukov
On 15.09.2012 16:50, Mikolaj Golub wrote:
 I am attaching the patch that fixes the issue for me.
 
 I was wandering why the issue was not observed after md device
 removal, as disk_OS_get_MD_disks() did the same things. It has turned
 out that hostres just does not see md devices, so this function is
 currently useless. hostres gets devices from devinfo(3), which does
 not return md devices.
 
 disk_OS_get_disks() calls kern.disks sysctl to get the list of disks,
 and uses device_map differently, so it is not affected.

I also have a big patch to the hostres module, but it is not yet
finished. Probably i should commit the part related to the disk
subsystem. This part has been rewritten to be GEOM aware.

-- 
WBR, Andrey V. Elsukov
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-16 Thread Miroslav Lachman

Mikolaj Golub wrote:

On Sun, Sep 09, 2012 at 11:56:55PM +0200, Miroslav Lachman wrote:

I am running bsnmpd with basic snmpd.config (only community and location
changed).

When there is a problem with HDD and disk disapeared from ATA channel
(eg.: disc physically removed) the bsnmpd always dumps core:

kernel: pid 1188 (bsnmpd), uid 0: exited on signal 11 (core dumped)

I see this for a long rime on all releases of 7.x and 8.x branches (i386
and amd64). I did not tested 9.x.


Ok, I was able to to reproduce this under qemu doing

   atacontrol detach ata1


[...]


and it crashes in disk_OS_get_ATA_disks() when the removed map entry
is dereferenced.

I am attaching the patch that fixes the issue for me.


I am glad to read that you found the bug!
The fix (patch) seems trivial - will it be commited / MFCed? :)

Thank you for your work on this problem!

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: how to update ports while using pkgng?

2012-09-16 Thread Sergey V. Dyatko
On Sat, 15 Sep 2012 08:48:09 -0300
Marcelo Gondim gon...@bsdinfo.com.br wrote:

 Em 15/09/2012 01:41, Mike Manilone escreveu:
  Hi,
 
  I'm using ports with pkgng enabled. But I found that portmaster
  won't work. Is there any way to update ports? Thanks!
 
 Hi,
 
 I use portsnap fetch update and portmaster to update my ports.
 

with pkgng ? :/

 Gondim

-- 
wbr, tiger
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: how to update ports while using pkgng?

2012-09-16 Thread Chuck Burns
On Sun, Sep 16, 2012 at 12:42 PM, Sergey V. Dyatko
sergey.dya...@gmail.com wrote:
 On Sat, 15 Sep 2012 08:48:09 -0300
 Marcelo Gondim gon...@bsdinfo.com.br wrote:

 Em 15/09/2012 01:41, Mike Manilone escreveu:
  Hi,
 
  I'm using ports with pkgng enabled. But I found that portmaster
  won't work. Is there any way to update ports? Thanks!

 Hi,

 I use portsnap fetch update and portmaster to update my ports.


 with pkgng ? :/


That is akin to asking How do I start my boat with my car keys?
Ports and packages are NOT the same thing.

Ports are compiled from source. Packages are precompiled.

Pkgng is for packages. not ports.  Once the port is compiled, the
ports system uses whatever pkg manager you've chosen, to install it.

However, portmaster doesn't -just- use the ports system. It also tries
to pre-determine the dependencies, which is why it needs be
pkgng-aware.

Chuck
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: bsnmpd always died on HDD detach

2012-09-16 Thread Mikolaj Golub
On Sun, Sep 16, 2012 at 05:56:22PM +0400, Andrey V. Elsukov wrote:
 On 15.09.2012 16:50, Mikolaj Golub wrote:
  I am attaching the patch that fixes the issue for me.
  
  I was wandering why the issue was not observed after md device
  removal, as disk_OS_get_MD_disks() did the same things. It has turned
  out that hostres just does not see md devices, so this function is
  currently useless. hostres gets devices from devinfo(3), which does
  not return md devices.
  
  disk_OS_get_disks() calls kern.disks sysctl to get the list of disks,
  and uses device_map differently, so it is not affected.
 
 I also have a big patch to the hostres module, but it is not yet
 finished. Probably i should commit the part related to the disk
 subsystem. This part has been rewritten to be GEOM aware.

Wonderful! And as I understand it will solve this problem too? Then I
think no need in committing my patch, unless you are not planning to
merge to stable/[78] (where any fix for this problem is highly
desirable).

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: how to update ports while using pkgng?

2012-09-16 Thread Marcelo Gondim

Em 16/09/2012 14:42, Sergey V. Dyatko escreveu:

On Sat, 15 Sep 2012 08:48:09 -0300
Marcelo Gondim gon...@bsdinfo.com.br wrote:


Em 15/09/2012 01:41, Mike Manilone escreveu:

Hi,

I'm using ports with pkgng enabled. But I found that portmaster
won't work. Is there any way to update ports? Thanks!

Hi,

I use portsnap fetch update and portmaster to update my ports.


with pkgng ? :/


Nope, because pkgng update only binary packages.




Gondim


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: how to update ports while using pkgng?

2012-09-16 Thread Matthew Seaman
On 16/09/2012 21:10, Marcelo Gondim wrote:
 Em 16/09/2012 14:42, Sergey V. Dyatko escreveu:
 On Sat, 15 Sep 2012 08:48:09 -0300
 Marcelo Gondim gon...@bsdinfo.com.br wrote:

 Em 15/09/2012 01:41, Mike Manilone escreveu:
 Hi,

 I'm using ports with pkgng enabled. But I found that portmaster
 won't work. Is there any way to update ports? Thanks!
 Hi,

 I use portsnap fetch update and portmaster to update my ports.

 with pkgng ? :/
 
 Nope, because pkgng update only binary packages.

A pkg is what you get by compiling and installing a port.  So even if
you never download anything other than source code which you religiously
compile yourself using the ports, your system will still end up full of
pkgs.

pkgng is not just about binary pkg distribution systems: it's also about
managing the software installed on your system.  It changes the package
registry completely -- using sqlite, rather than a bunch of files and
directories under /var/db/pkg -- and all the Makefile bits under
/usr/ports/Mk that deal with registering new packages and so forth.

This means that any software designed to interact with the ports tree
will quite likely need to be modified to operate correctly in a
pkgng-enabled system.  portmaster is no exception, except that unlike
most other ports-related software, the author of portmaster has not
accepted patches for pkgng support to be incorporated directly into his
code or into the portmaster port, so it is necessary to download and
apply a patch from github separately:

https://github.com/pkgng/pkgng/blob/master/ports/patch-portmaster-pkgng

See the FAQ for instructions:
https://github.com/pkgng/pkgng/blob/master/FAQ.md#15

With the patch applied you can used portmaster as usual and (almost)
everything will work exactly as before.  Some of the output will change,
since pkgng produces different output while working compared to
pkg_tools.  Also pkgng-enabled portmaster doesn't support creating a
cache of pre-compiled packages yet.

Cheers,

Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Re: how to update ports while using pkgng?

2012-09-16 Thread Andreas Nilsson
On Sat, Sep 15, 2012 at 6:41 AM, Mike Manilone crtm...@gmx.us wrote:

 Hi,

 I'm using ports with pkgng enabled. But I found that portmaster won't
 work. Is there any way to update ports? Thanks!


Since no one asked: Why would you want to do it this way? If you are using
pkgng updating is as easy as: pkg upgrade.

If you have some programs installed not available from official pkgng
repositories you are on thin ice and should consider using something like
ports-mgmt/poudriere to build pkgng packages of those ports and host your
own repo from which you can then install them.

As others already said: pkgng is drastically different from previous
package management, so they do should not be used in parallel.

Best regards
Andreas
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org