Re: Troubleshooting boot problems

2010-04-21 Thread Joao Pinto
On Wed, Apr 21, 2010 at 5:22 AM, Florian Diesch wrote:

> Patrick Goetz  writes:
> > nothing.  Maybe /etc/init/networking.conf emits net-device-added?
>
> I guess it's emitted by upstart-udev-bridge
>
> > How can one find out for sure?
>
> I'd have a look at the upstart-udev-bridge source code
>

grep -r net-device-added upstart-0.6.5
upstart-0.6.5/NEWS:start on net-device-added INTERFACE!=eth*
upstart-0.6.5/init/man/init.5:start on net-device-added INTERFACE!=lo

They show up on the manual as an example, they are not triggered from the
upstart source, random guesses don't really help. Even if they were
available from the source Patrick point is valid, you are not expected to
check source code to identify how the startup system works, if there are
events that can be emitted without being defined on an upstart .conf there
should be an easy way to identify it's purpose and it's emitter.


> Next, suppose I don't want to run ufw -- what's the procedure for
> > turning this service off?  Deleting the ufw.conf script from /etc/init?
> >   This seems terribly irreversible.
>
> Remove the package if you don't want it.--
>

The question was how to disable, not how to remove.

Thanks

-- 
João Luís Marques Pinto
GetDeb Team Leader
http://www.getdeb.net
http://blog.getdeb.net
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Florian Diesch
Joao Pinto  writes:

> On Wed, Apr 21, 2010 at 5:22 AM, Florian Diesch wrote:
>
>> Patrick Goetz  writes:
>> > nothing.  Maybe /etc/init/networking.conf emits net-device-added?
>>
>> I guess it's emitted by upstart-udev-bridge
>>
>> > How can one find out for sure?
>>
>> I'd have a look at the upstart-udev-bridge source code
>>
>
> grep -r net-device-added upstart-0.6.5
> upstart-0.6.5/NEWS:start on net-device-added INTERFACE!=eth*
> upstart-0.6.5/init/man/init.5:start on net-device-added INTERFACE!=lo
>
> They show up on the manual as an example, they are not triggered from the
> upstart source, random guesses don't really help. 

It's emitted in upstart-0.6.3/udev/upstart-udev-bridge.c, function
udev_monitor_watcher(), when a device of the 'net' subsystems is added.

I don't think it has changed in 0.6.5

> Even if they were available from the source Patrick point is valid,
> you are not expected to check source code to identify how the startup
> system works, if there are events that can be emitted without being
> defined on an upstart .conf there should be an easy way to identify
> it's purpose and it's emitter.

Any event can be emitted by any program using upstart's DBus API. 

IMHO it's not that important to know where a event gets emitted
(that's an implementation detail) but what it actually
means. 

Unfortunately quite often this is not documented so far so one has to
guess or use the source code until someone steps up and writes the docs.


>> Next, suppose I don't want to run ufw -- what's the procedure for
>> > turning this service off?  Deleting the ufw.conf script from /etc/init?
>> >   This seems terribly irreversible.
>>
>> Remove the package if you don't want it.--
>>
> The question was how to disable, not how to remove.

If you think you still need the package for some reason removing the
"start on" line should prevent it from getting started (not tested).



   Florian
-- 
GUIs programmieren mit Python und Glade:


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Typo in the italian apt-get translation

2010-04-21 Thread Gianfranco Costamagna
Hi I just found a typo in the italian translation of apt-get...

How can I report or fix it?

thanks

 Just my two cents


Gianfranco



  


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Typo in the italian apt-get translation

2010-04-21 Thread Gianfranco Costamagna
I couldn't find the source of apt-get by apt-get source command...

Should I report it on LP?

 thanksJust my two cents


Gianfranco



- Messaggio originale -
> Da: Caroline Ford 
> A: Gianfranco Costamagna 
> Inviato: Mer 21 aprile 2010, 12:37:45
> Oggetto: Re: Typo in the italian apt-get translation
> 
> File a bug, preferably with a patch.

Sent from a mobile device.

On 
> 21 Apr 2010, at 11:33, Gianfranco Costamagna <
> ymailto="mailto:costamagnagianfra...@yahoo.it"; 
> href="mailto:costamagnagianfra...@yahoo.it";>costamagnagianfra...@yahoo.it 
> 
> wrote:

> Hi I just found a typo in the italian translation 
> of apt-get...
>
> How can I report or fix it?
>
> 
> thanks
>
> Just my two cents
>
>
> 
> Gianfranco
>
>
>
>
>
>
> -- 
> 
> Ubuntu-devel-discuss mailing list
> 
> ymailto="mailto:Ubuntu-devel-discuss@lists.ubuntu.com"; 
> href="mailto:Ubuntu-devel-discuss@lists.ubuntu.com";>Ubuntu-devel-discuss@lists.ubuntu.com
> 
> Modify settings or unsubscribe at: 
> href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss"; 
> target=_blank 
> >https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


  


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Typo in the italian apt-get translation

2010-04-21 Thread Joao Pinto
On Wed, Apr 21, 2010 at 11:45 AM, Gianfranco Costamagna <
costamagnagianfra...@yahoo.it> wrote:

> I couldn't find the source of apt-get by apt-get source command...
>
> Should I report it on LP?
>
>  thanksJust my two cents
>
>
> Gianfranco
>
>
Hello,
apt-get is not a package name, you can find the package which provides it
with:
dpkg -S apt-get

Then fetch it with:
apt-get source apt

Best regards,

-- 
João Luís Marques Pinto
GetDeb Team Leader
http://www.getdeb.net
http://blog.getdeb.net
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Patrick Goetz
> 
> Subject: Re: Troubleshooting boot problems
> From: Florian Diesch 
> Date: Wed, 21 Apr 2010 12:18:40 +0200
> 
> Any event can be emitted by any program using upstart's DBus API. 
> 
> IMHO it's not that important to know where a event gets emitted
> (that's an implementation detail) but what it actually
> means. 
> 

I'm not sure I agree with this.  I understand that an event driven 
system isn't linear (see previous discussion thread) but some services 
do have linear dependencies; i.e. there are some services which can only 
be started after others (yes, I realize this is an event dependency -- 
it's still a linear relationship).

The example I provided should be adequate:  most iptables scripts start 
by flushing the tables.  If I have a custom table I need/want to have, 
it's important to me to know if ufw is running before or after my 
script, since I don't want my iptables rules to be flushed when the 
system is fully booted.  The question: does ufw run before or after the 
rc2.d scripts? is a question about a linear ordering, and an 
administrator should be able to determine this what looking at source 
code or jumping through a bunch of hoops.  Perhaps a program like 
pstree, but for events, would be useful?

Speculation about how to suspend a service is all well and good 
(commenting out the start line seems logical) but there should be an 
*official* way to do this to avoid problems down the road.


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Charlie Kravetz
On Wed, 21 Apr 2010 11:19:29 -0500
Patrick Goetz  wrote:

> > 
> > Subject: Re: Troubleshooting boot problems
> > From: Florian Diesch 
> > Date: Wed, 21 Apr 2010 12:18:40 +0200
> > 
> > Any event can be emitted by any program using upstart's DBus API. 
> > 
> > IMHO it's not that important to know where a event gets emitted
> > (that's an implementation detail) but what it actually
> > means. 
> > 
> 
> I'm not sure I agree with this.  I understand that an event driven 
> system isn't linear (see previous discussion thread) but some services 
> do have linear dependencies; i.e. there are some services which can only 
> be started after others (yes, I realize this is an event dependency -- 
> it's still a linear relationship).
> 
> The example I provided should be adequate:  most iptables scripts start 
> by flushing the tables.  If I have a custom table I need/want to have, 
> it's important to me to know if ufw is running before or after my 
> script, since I don't want my iptables rules to be flushed when the 
> system is fully booted.  The question: does ufw run before or after the 
> rc2.d scripts? is a question about a linear ordering, and an 
> administrator should be able to determine this what looking at source 
> code or jumping through a bunch of hoops.  Perhaps a program like 
> pstree, but for events, would be useful?
> 
> Speculation about how to suspend a service is all well and good 
> (commenting out the start line seems logical) but there should be an 
> *official* way to do this to avoid problems down the road.
> 
> 

What about using the settings in /etc/default/ufw ?


-- 
Charlie Kravetz 
Linux Registered User Number 425914  [http://counter.li.org/]
Never let anyone steal your DREAM.   [http://keepingdreams.com]

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Scott James Remnant
Just answering the bits that are/look like questions ...

On Tue, 2010-04-20 at 14:33 -0500, Patrick Goetz wrote:

> What emits the net-device-added event?
> 
It's emitted by "ifup" and by Network Manager, both via
the /etc/network/if-up.d/upstart script.

> When is this run vis' a vis the /etc/rc2.d scripts?
> 
Before, after, during, etc.  There is no fixed relationship between
these two things, except that /etc/rcS.d (and thus /etc/rc2.d) will not
be run until the "lo" device is up.

> OK, well what service emits a runlevel event?
> 
None.

It's emitted by the /sbin/telinit tool.

> Next, suppose I don't want to run ufw -- what's the procedure for 
> turning this service off?  Deleting the ufw.conf script from /etc/init? 
>   This seems terribly irreversible.
> 
Yes, or renaming to .conf-disabled is a common pattern.

Scott
-- 
Scott James Remnant
sc...@ubuntu.com


signature.asc
Description: This is a digitally signed message part
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Scott James Remnant
On Wed, 2010-04-21 at 11:39 -0700, Scott James Remnant wrote:

> On Tue, 2010-04-20 at 14:33 -0500, Patrick Goetz wrote:
> 
> > What emits the net-device-added event?
> > 
> It's emitted by "ifup" and by Network Manager, both via
> the /etc/network/if-up.d/upstart script.
> 
Sorry, this was the answer for the "net-device-up" event ;-)

net-device-added is emitted by the Upstart/udev bridge.  Any event of
the form ${SUBSYSTEM}-device-{added,changed,removed} is an Upstart copy
of a kernel event.

You can watch those with, e.g. "udevadm monitor -e"

Scott
-- 
Scott James Remnant
sc...@ubuntu.com


signature.asc
Description: This is a digitally signed message part
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Florian Diesch
Scott James Remnant  writes:


>> Next, suppose I don't want to run ufw -- what's the procedure for 
>> turning this service off?  Deleting the ufw.conf script from /etc/init? 
>>   This seems terribly irreversible.
>> 
> Yes, or renaming to .conf-disabled is a common pattern.

Doesn't the file get recreated on package updates?

   Florian
-- 


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Scott James Remnant
On Wed, 2010-04-21 at 21:37 +0200, Florian Diesch wrote:

> Scott James Remnant  writes:
> 
> >> Next, suppose I don't want to run ufw -- what's the procedure for 
> >> turning this service off?  Deleting the ufw.conf script from /etc/init? 
> >>   This seems terribly irreversible.
> >> 
> > Yes, or renaming to .conf-disabled is a common pattern.
> 
> Doesn't the file get recreated on package updates?
> 
No!

dpkg explicitly honours removals as a configuration change

Scott
-- 
Scott James Remnant
sc...@ubuntu.com


signature.asc
Description: This is a digitally signed message part
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Patrick Goetz
Scott James Remnant wrote:
>> When is ufw run vis' a vis the /etc/rc2.d scripts?
>>
> Before, after, during, etc.  There is no fixed relationship between
> these two things, except that /etc/rcS.d (and thus /etc/rc2.d) will not
> be run until the "lo" device is up.
> 

Then this is problematic for my example of the iptables script run from 
rc2.d.  In generally, this sounds like it could cause hard to debug, 
intermittent problems, and I need to just turn ufw off.  Sadly, this is 
installed by default for even the most basic server install?  Lots and 
lots of server users have legacy iptables firewall scripts and are going 
to be blind-sided by this

 >> OK, well what service emits a runlevel event?
 >>
 > None.  It's emitted by the /sbin/telinit tool.

OK, but this doesn't this assume at least one run level change?  The 
rc2.d scripts are run, so something must be running telinit in order to 
trigger rc.conf -- who does that?


 >>> What emits the net-device-added event?
 >
 > net-device-added is emitted by the Upstart/udev bridge.  Any event of
 > the form ${SUBSYSTEM}-device-{added,changed,removed} is an
 > Upstart copy of a kernel event.
 >
 > You can watch those with, e.g. "udevadm monitor -e"
 >

I like Upstart, but this discussion should make it clear that we might 
be headed for a übergeek train wreck without better documentation and 
perhaps some management tools.  Most sys admins are not going to have 
time/interest to hang out on the ubuntu-devel-discuss list to find out 
why, say, autofs won't start ever since they upgraded their server from 
Lenny to Lucid and discover they have no idea how the system works any 
more.  There's a tipping point for technology adoption that revolves 
around continuity and clarity;  XSLT and XSL-FO are perfect examples of 
great technologies that have failed to be widely adopted because they're 
just too complicated to use, have some poorly thought out default 
behaviors, and there's not quite enough clear documentation explaining 
the idiosyncrasies. (Note that I'm not complaining, just pointing out 
potentially dangerous curves in the road.)





-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Rant about 10.04's installer on ubuntu-users

2010-04-21 Thread Tom H
https://lists.ubuntu.com/archives/ubuntu-users/2010-April/216013.html

Since the person who posted does not want to file a bug report, I
thought that i should point this out.

>From the link above:

Long story short: the only way to be safe right now is to physically
remove drives with important data during the install.

I figured out the cause of my RAID problems, and it's a problem with
ubuntu's installer. This will cost people their data if not fixed.
Sorry about the length of this post, but the problem takes a while to
explain.

The following scenario is not the only way your partitions can get
hosed. I simply use it because it's a common use case, it illustrates
what data is where on the hard drives, and it exposes the flaws in the
installer's logic. It also doesn't matter if you don't touch a
particular drive, partition, or file system during the install. The
data on it can still be corrupted.

Suppose you have a hard drive with some partitions on it. On one of
those partitions you have a linux file system which houses your data.
We'll say for the sake of this discussion that sda2 contains an EXT4
file system with your data. So far, so good.

Because this data is too important to rely on a single drive, you decide
to buy some more drives and make a RAID 5 device. You buy 3 more drives
and create similar partitions an them (say, sdb2, sdc2, and sdd2). You
copy the data currently on sda2 somewhere safe, then you use mdadm to
create a RAID5 array with sda2, sdb2, sdc2, and sdd2. The new RAID
device is md0. You create an XFS file system on md0 and move your data
to it*. This is all perfectly fine, but the stage has been set for
disaster with the ubuntu installer.

Later, you decide to do a clean install of ubuntu on sda1 (sda1 is *not*
part of the RAID array), and you get to the partitioning stage and
select manual partitioning. This is where things get really ugly really
fast.

The bug is how the installer detects existing file systems. It simply
reads the raw data in a partition to see if the bits it finds correspond
to a known file system. In the above example, the installer detects the
remnants of the original (non-RAID) file system on sda2 and thinks it's
a current EXT4 file system. Even if you use fdisk to mark sda2's
partition type as 'RAID autodetect' instead of 'linux' (which is no
longer necessary), the installer still detects the partition as having
an EXT4 file system.

Once this 'ghost' file system is detected, the installer gets really
confused about what goes where and will try to write to sda2 during the
install, even if you told the installer to ignore sda2 and just install
to sda1. This corrupts the current XFS file system on md0, and you're
screwed.

The overall flaw here is in the file system detection; you can't just
assume that any sequence of bits you find sitting around on a hard drive
are still current.

A possible solution may be to first check for a RAID superblock, and if
found that trumps all file system detection. I imagine something
similar will have to be done with partitions that are part of an LVM
volume as well.

-Alvin

* In my case, I took a shortcut and created a degraded array (missing
sda2), copied the data from sda2 to the array, added sda2 to the array,
and resynched. I don't think it makes a difference.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Troubleshooting boot problems

2010-04-21 Thread Scott James Remnant
On Wed, 2010-04-21 at 15:29 -0500, Patrick Goetz wrote:

>  >> OK, well what service emits a runlevel event?
>  >>
>  > None.  It's emitted by the /sbin/telinit tool.
> 
> OK, but this doesn't this assume at least one run level change?  The 
> rc2.d scripts are run, so something must be running telinit in order to 
> trigger rc.conf -- who does that?
> 
rc-sysinit.conf does on startup

Scott
-- 
Scott James Remnant
sc...@ubuntu.com


signature.asc
Description: This is a digitally signed message part
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss